From 8b9ee21dfceadd4cc35a87bbe7f0ad547cffa1be Mon Sep 17 00:00:00 2001 From: Jeff Layton Date: Thu, 25 Aug 2022 09:31:32 -0400 Subject: [PATCH] ceph: report STATX_ATTR_ENCRYPTED on encrypted inodes Reviewed-by: Xiubo Li Signed-off-by: Jeff Layton --- fs/ceph/inode.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index a8a6e55252c0..fb507d57cb26 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c @@ -3000,6 +3000,10 @@ int ceph_getattr(struct user_namespace *mnt_userns, const struct path *path, stat->nlink = 1 + 1 + ci->i_subdirs; } + if (IS_ENCRYPTED(inode)) + stat->attributes |= STATX_ATTR_ENCRYPTED; + stat->attributes_mask |= STATX_ATTR_ENCRYPTED; + stat->result_mask = request_mask & valid_mask; return err; } -- 2.47.3