Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

GFS2: fallocate: do not rely on file_update_time to mark the inode dirty

Previously __gfs2_fallocate() relied on file_update_time() marking the
inode dirty, but that's not a safe assumption as that function doesn't
dirty the inode in some cases. Mark the inode dirty explicitly.

Signed-off-by: Andrew Price <anprice@redhat.com>
Signed-off-by: Bob Peterson <rpeterso@redhat.com>

authored by

Andrew Price and committed by
Bob Peterson
4b813f09 6ff33f39

+1 -1
+1 -1
fs/gfs2/file.c
··· 897 897 898 898 if (!(mode & FALLOC_FL_KEEP_SIZE) && (pos + count) > inode->i_size) { 899 899 i_size_write(inode, pos + count); 900 - /* Marks the inode as dirty */ 901 900 file_update_time(file); 901 + mark_inode_dirty(inode); 902 902 } 903 903 904 904 return generic_write_sync(file, pos, count);