From: Andrew Price Date: Tue, 22 Sep 2015 12:41:21 +0000 (-0500) Subject: GFS2: fallocate: do not rely on file_update_time to mark the inode dirty X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4b813f09405823dcbb27a434f6ddcd1741e55e9b;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Bob Peterson --- 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 if (!(mode & FALLOC_FL_KEEP_SIZE) && (pos + count) > inode->i_size) { i_size_write(inode, pos + count); - /* Marks the inode as dirty */ file_update_time(file); + mark_inode_dirty(inode); } return generic_write_sync(file, pos, count);