atm: idt77252: fix a memleak in open_card_ubr0
[platform/kernel/linux-rpi.git] / fs / ceph / ioctl.c
index 11d37d3..91a8491 100644 (file)
@@ -294,6 +294,10 @@ static long ceph_set_encryption_policy(struct file *file, unsigned long arg)
        struct inode *inode = file_inode(file);
        struct ceph_inode_info *ci = ceph_inode(inode);
 
+       /* encrypted directories can't have striped layout */
+       if (ci->i_layout.stripe_count > 1)
+               return -EINVAL;
+
        ret = vet_mds_for_fscrypt(file);
        if (ret)
                return ret;