From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx180.postini.com [74.125.245.180]) by kanga.kvack.org (Postfix) with SMTP id 23D806B0092 for ; Thu, 16 Feb 2012 08:46:53 -0500 (EST) From: Jan Kara Subject: [PATCH 06/11] 9p: Push file_update_time() into v9fs_vm_page_mkwrite() Date: Thu, 16 Feb 2012 14:46:14 +0100 Message-Id: <1329399979-3647-7-git-send-email-jack@suse.cz> In-Reply-To: <1329399979-3647-1-git-send-email-jack@suse.cz> References: <1329399979-3647-1-git-send-email-jack@suse.cz> Sender: owner-linux-mm@kvack.org List-ID: To: LKML Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, Andrew Morton , Eric Sandeen , Dave Chinner , Jan Kara , Eric Van Hensbergen , Ron Minnich , Latchesar Ionkov , v9fs-developer@lists.sourceforge.net CC: Eric Van Hensbergen CC: Ron Minnich CC: Latchesar Ionkov CC: v9fs-developer@lists.sourceforge.net Signed-off-by: Jan Kara --- fs/9p/vfs_file.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) BTW: I see you don't check whether the page you locked isn't beyond i_size. Cannot your code race with truncate? See checks in __block_page_mkwrite()... diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c index fc06fd2..dd6f7ee 100644 --- a/fs/9p/vfs_file.c +++ b/fs/9p/vfs_file.c @@ -610,6 +610,9 @@ v9fs_vm_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf) p9_debug(P9_DEBUG_VFS, "page %p fid %lx\n", page, (unsigned long)filp->private_data); + /* Update file times before taking page lock */ + file_update_time(filp); + v9inode = V9FS_I(inode); /* make sure the cache has finished storing the page */ v9fs_fscache_wait_on_page_write(inode, page); -- 1.7.1 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org