gfs2: Push file_update_time() into gfs2_page_mkwrite()
authorJan Kara <jack@suse.cz>
Tue, 12 Jun 2012 14:20:26 +0000 (16:20 +0200)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 30 Jul 2012 21:02:46 +0000 (01:02 +0400)
CC: Steven Whitehouse <swhiteho@redhat.com>
CC: cluster-devel@redhat.com
Acked-by: Steven Whitehouse <swhiteho@redhat.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/gfs2/file.c

index 31b199f6efc1d538657b744e1dda7334e54029cc..07959150d44e09180dfc85b2819ef2e2632ebd65 100644 (file)
@@ -376,6 +376,9 @@ static int gfs2_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
         */
        vfs_check_frozen(inode->i_sb, SB_FREEZE_WRITE);
 
+       /* Update file times before taking page lock */
+       file_update_time(vma->vm_file);
+
        gfs2_holder_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &gh);
        ret = gfs2_glock_nq(&gh);
        if (ret)