Thread (19 messages) 19 messages, 8 authors, 2022-08-10
STALE1427d

[RFC PATCH 3/4] afs: fill out change attribute in statx replies

From: Jeff Layton <jlayton@kernel.org>
Date: 2022-08-05 18:36:04
Also in: ceph-devel, linux-btrfs, linux-fsdevel, linux-nfs, linux-xfs
Subsystem: afs filesystem, filesystems (vfs and infrastructure), the rest · Maintainers: David Howells, Marc Dionne, Alexander Viro, Christian Brauner, Linus Torvalds

Always copy the change attribute in a statx reply, and set the
STATX_CHGATTR bit unconditionally.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
 fs/afs/inode.c | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/fs/afs/inode.c b/fs/afs/inode.c
index 64dab70d4a4f..dffd6edd6628 100644
--- a/fs/afs/inode.c
+++ b/fs/afs/inode.c
@@ -760,6 +760,8 @@ int afs_getattr(struct user_namespace *mnt_userns, const struct path *path,
 	do {
 		read_seqbegin_or_lock(&vnode->cb_lock, &seq);
 		generic_fillattr(&init_user_ns, inode, stat);
+		stat->chgattr = inode_peek_iversion_raw(inode);
+		stat->result_mask |= STATX_CHGATTR;
 		if (test_bit(AFS_VNODE_SILLY_DELETED, &vnode->flags) &&
 		    stat->nlink > 0)
 			stat->nlink -= 1;
-- 
2.37.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help