From: Jeff Layton <jlayton@xxxxxxxxxx> Reviewed-by: Xiubo Li <xiubli@xxxxxxxxxx> Signed-off-by: Jeff Layton <jlayton@xxxxxxxxxx> --- fs/ceph/inode.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index 696c4c826b0b..495415fada04 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c @@ -3008,6 +3008,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.31.1