diff mbox series

ceph: report STATX_ATTR_ENCRYPTED on encrypted inodes

Message ID 20220504110536.13418-1-jlayton@kernel.org
State Superseded
Headers show
Series ceph: report STATX_ATTR_ENCRYPTED on encrypted inodes | expand

Commit Message

Jeff Layton May 4, 2022, 11:05 a.m. UTC
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
 fs/ceph/inode.c | 4 ++++
 1 file changed, 4 insertions(+)

...another minor patch for the fscrypt pile.
diff mbox series

Patch

diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
index ae9afc149da1..f7d56aaea27d 100644
--- a/fs/ceph/inode.c
+++ b/fs/ceph/inode.c
@@ -2979,6 +2979,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;
 }