GFS2: Update timestamps on fallocate
authorAndrew Price <anprice@redhat.com>
Wed, 12 Nov 2014 17:24:05 +0000 (17:24 +0000)
committerSteven Whitehouse <swhiteho@redhat.com>
Fri, 14 Nov 2014 14:16:33 +0000 (14:16 +0000)
gfs2_fallocate() wasn't updating ctime and mtime when modifying the
inode. Add a call to file_update_time() to do that.

Signed-off-by: Andrew Price <anprice@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
fs/gfs2/file.c

index 1182164..6e600ab 100644 (file)
@@ -874,7 +874,8 @@ retry:
 
        if (!(mode & FALLOC_FL_KEEP_SIZE) && (pos + count) > inode->i_size) {
                i_size_write(inode, pos + count);
-               mark_inode_dirty(inode);
+               /* Marks the inode as dirty */
+               file_update_time(file);
        }
 
        return generic_write_sync(file, pos, count);