diff options
Diffstat (limited to 'fs/ceph')
-rw-r--r-- | fs/ceph/dir.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c index 4990886a366c..0e4f8e07022d 100644 --- a/fs/ceph/dir.c +++ b/fs/ceph/dir.c @@ -1090,6 +1090,11 @@ static int ceph_mkdir(struct mnt_idmap *idmap, struct inode *dir, err = -EDQUOT; goto out; } + if ((op == CEPH_MDS_OP_MKSNAP) && IS_ENCRYPTED(dir) && + !fscrypt_has_encryption_key(dir)) { + err = -ENOKEY; + goto out; + } req = ceph_mdsc_create_request(mdsc, op, USE_AUTH_MDS); |