diff options
author | Andrew Price <anprice@redhat.com> | 2015-09-22 08:41:21 -0400 |
---|---|---|
committer | Bob Peterson <rpeterso@redhat.com> | 2015-09-22 08:41:46 -0400 |
commit | 4b813f09405823dcbb27a434f6ddcd1741e55e9b (patch) | |
tree | 182786b5c4e375ff47426d255d0e53cd20895951 /fs/gfs2 | |
parent | 6ff33f3902c3b1c5d0db6b1e2c70b6d76fba357f (diff) |
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>
Diffstat (limited to 'fs/gfs2')
-rw-r--r-- | fs/gfs2/file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c index cf4ab89159f4..71cd138c0676 100644 --- a/fs/gfs2/file.c +++ b/fs/gfs2/file.c | |||
@@ -897,8 +897,8 @@ static long __gfs2_fallocate(struct file *file, int mode, loff_t offset, loff_t | |||
897 | 897 | ||
898 | if (!(mode & FALLOC_FL_KEEP_SIZE) && (pos + count) > inode->i_size) { | 898 | if (!(mode & FALLOC_FL_KEEP_SIZE) && (pos + count) > inode->i_size) { |
899 | i_size_write(inode, pos + count); | 899 | i_size_write(inode, pos + count); |
900 | /* Marks the inode as dirty */ | ||
901 | file_update_time(file); | 900 | file_update_time(file); |
901 | mark_inode_dirty(inode); | ||
902 | } | 902 | } |
903 | 903 | ||
904 | return generic_write_sync(file, pos, count); | 904 | return generic_write_sync(file, pos, count); |