[Cluster-devel] [PATCH] gfs2: Update ctime in setflags ioctl

Andreas Gruenbacher agruenba at redhat.com
Thu Sep 21 21:18:57 UTC 2017


The FS_IOC_SETFLAGS ioctl is supposed to update the inode ctime.
Fixes xfstests generic/277.

Signed-off-by: Andreas Gruenbacher <agruenba at redhat.com>
---
 fs/gfs2/file.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c
index 41ac7ef2755b..8fefb80fe830 100644
--- a/fs/gfs2/file.c
+++ b/fs/gfs2/file.c
@@ -282,6 +282,7 @@ static int do_gfs2_set_flags(struct file *filp, u32 reqflags, u32 mask)
 	error = gfs2_meta_inode_buffer(ip, &bh);
 	if (error)
 		goto out_trans_end;
+	inode->i_ctime = current_time(inode);
 	gfs2_trans_add_meta(ip->i_gl, bh);
 	ip->i_diskflags = new_flags;
 	gfs2_dinode_out(ip, bh->b_data);
-- 
2.13.3




More information about the Cluster-devel mailing list