From eada6106e6cb7d915b40d189fa5e33676550417e Mon Sep 17 00:00:00 2001 From: Jeff Layton Date: Tue, 3 May 2022 14:56:51 -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 56f2fe005d818..519de1748fcb6 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c @@ -2985,6 +2985,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.39.5