diff options
author | Jeff Layton <jlayton@kernel.org> | 2023-09-29 20:43:18 +0200 |
---|---|---|
committer | Chandan Babu R <chandanbabu@kernel.org> | 2023-10-12 06:47:03 +0200 |
commit | cbc06310c36f73a5f3b0c6f0d974d60cf66d816b (patch) | |
tree | 46917032ad609f8e12679a93c6920a8cff3e9605 /fs/xfs | |
parent | xfs: Remove duplicate include (diff) | |
download | linux-cbc06310c36f73a5f3b0c6f0d974d60cf66d816b.tar.xz linux-cbc06310c36f73a5f3b0c6f0d974d60cf66d816b.zip |
xfs: reinstate the old i_version counter as STATX_CHANGE_COOKIE
The handling of STATX_CHANGE_COOKIE was moved into generic_fillattr in
commit 0d72b92883c6 (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: 0d72b92883c6 (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>
Diffstat (limited to 'fs/xfs')
-rw-r--r-- | fs/xfs/xfs_iops.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c index 1c1e6171209d..2b3b05c28e9e 100644 --- a/fs/xfs/xfs_iops.c +++ b/fs/xfs/xfs_iops.c @@ -584,6 +584,11 @@ xfs_vn_getattr( } } + if ((request_mask & STATX_CHANGE_COOKIE) && IS_I_VERSION(inode)) { + stat->change_cookie = inode_query_iversion(inode); + stat->result_mask |= STATX_CHANGE_COOKIE; + } + /* * Note: If you add another clause to set an attribute flag, please * update attributes_mask below. |