%patch Index: linux.d/mm/filemap.c =================================================================== --- linux.d.orig/mm/filemap.c 2003-12-03 19:58:05.000000000 -0500 +++ linux.d/mm/filemap.c 2003-12-03 19:58:05.000000000 -0500 @@ -3095,6 +3095,14 @@ return err; } +static void update_inode_times(struct inode *inode) +{ + time_t now = CURRENT_TIME; + if (inode->i_ctime != now || inode->i_mtime != now) { + inode->i_ctime = inode->i_mtime = now; + mark_inode_dirty_sync(inode); + } +} /* * Write to a file through the page cache. * @@ -3253,8 +3261,7 @@ BUG(); remove_suid(inode); - inode->i_ctime = inode->i_mtime = CURRENT_TIME; - mark_inode_dirty_sync(inode); + update_inode_times(inode); written = generic_file_direct_IO(WRITE, file, (char *) buf, count, pos); if (written > 0) { .