Skip to content

Commit cbc0631

Browse files
jtlaytonChandan Babu R
authored andcommitted
xfs: reinstate the old i_version counter as STATX_CHANGE_COOKIE
The handling of STATX_CHANGE_COOKIE was moved into generic_fillattr in commit 0d72b92 (fs: pass the request_mask to generic_fillattr), but we didn't account for the fact that xfs doesn't call generic_fillattr at all. Make XFS report its i_version as the STATX_CHANGE_COOKIE. Fixes: 0d72b92 (fs: pass the request_mask to generic_fillattr) Signed-off-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: "Darrick J. Wong" <djwong@kernel.org> Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
1 parent f93b930 commit cbc0631

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

fs/xfs/xfs_iops.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -584,6 +584,11 @@ xfs_vn_getattr(
584584
}
585585
}
586586

587+
if ((request_mask & STATX_CHANGE_COOKIE) && IS_I_VERSION(inode)) {
588+
stat->change_cookie = inode_query_iversion(inode);
589+
stat->result_mask |= STATX_CHANGE_COOKIE;
590+
}
591+
587592
/*
588593
* Note: If you add another clause to set an attribute flag, please
589594
* update attributes_mask below.

0 commit comments

Comments
 (0)