|
@@ -34,9 +34,6 @@ static int create_encryption_context_from_policy(struct inode *inode,
|
|
|
{
|
|
|
struct fscrypt_context ctx;
|
|
|
|
|
|
- if (!inode->i_sb->s_cop->set_context)
|
|
|
- return -EOPNOTSUPP;
|
|
|
-
|
|
|
ctx.format = FS_ENCRYPTION_CONTEXT_FORMAT_V1;
|
|
|
memcpy(ctx.master_key_descriptor, policy->master_key_descriptor,
|
|
|
FS_KEY_DESCRIPTOR_SIZE);
|
|
@@ -87,8 +84,6 @@ int fscrypt_ioctl_set_policy(struct file *filp, const void __user *arg)
|
|
|
if (ret == -ENODATA) {
|
|
|
if (!S_ISDIR(inode->i_mode))
|
|
|
ret = -ENOTDIR;
|
|
|
- else if (!inode->i_sb->s_cop->empty_dir)
|
|
|
- ret = -EOPNOTSUPP;
|
|
|
else if (!inode->i_sb->s_cop->empty_dir(inode))
|
|
|
ret = -ENOTEMPTY;
|
|
|
else
|
|
@@ -118,8 +113,7 @@ int fscrypt_ioctl_get_policy(struct file *filp, void __user *arg)
|
|
|
struct fscrypt_policy policy;
|
|
|
int res;
|
|
|
|
|
|
- if (!inode->i_sb->s_cop->get_context ||
|
|
|
- !inode->i_sb->s_cop->is_encrypted(inode))
|
|
|
+ if (!inode->i_sb->s_cop->is_encrypted(inode))
|
|
|
return -ENODATA;
|
|
|
|
|
|
res = inode->i_sb->s_cop->get_context(inode, &ctx, sizeof(ctx));
|
|
@@ -202,9 +196,6 @@ int fscrypt_inherit_context(struct inode *parent, struct inode *child,
|
|
|
struct fscrypt_info *ci;
|
|
|
int res;
|
|
|
|
|
|
- if (!parent->i_sb->s_cop->set_context)
|
|
|
- return -EOPNOTSUPP;
|
|
|
-
|
|
|
res = fscrypt_get_encryption_info(parent);
|
|
|
if (res < 0)
|
|
|
return res;
|