From: Jeff Layton Date: Tue, 3 May 2022 18:56:51 +0000 (-0400) Subject: ceph: report STATX_ATTR_ENCRYPTED on encrypted inodes X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=eada6106e6cb7d915b40d189fa5e33676550417e;p=ceph-client.git ceph: report STATX_ATTR_ENCRYPTED on encrypted inodes Reviewed-by: Xiubo Li Signed-off-by: Jeff Layton --- diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index 56f2fe005d81..519de1748fcb 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; }