From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bob Peterson Date: Tue, 22 Sep 2015 08:44:53 -0400 (EDT) Subject: [Cluster-devel] [PATCH] GFS2: fallocate: do not rely on file_update_time to mark the inode dirty In-Reply-To: <1442916614-17003-1-git-send-email-anprice@redhat.com> References: <1442916614-17003-1-git-send-email-anprice@redhat.com> Message-ID: <910644418.31908305.1442925893619.JavaMail.zimbra@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit ----- Original Message ----- > 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 > --- > fs/gfs2/file.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c > index cf4ab89..71cd138 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); > -- > 2.4.3 Hi, Thanks. This is now applied to the for-next branch of the linux-gfs2 tree: https://git.kernel.org/cgit/linux/kernel/git/gfs2/linux-gfs2.git/commit/fs/gfs2?h=for-next&id=4b813f09405823dcbb27a434f6ddcd1741e55e9b Regards, Bob Peterson Red Hat File Systems