summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/file.c
diff options
context:
space:
mode:
authorChao Yu <chao2.yu@samsung.com>2015-05-27 15:27:49 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2015-06-01 16:21:07 -0700
commit4637fd11fff7ddca1a1d7d27d2fbfc4dcb8e9791 (patch)
tree0a619be7025b1b291653962eb580d77ed04f150b /fs/f2fs/file.c
parent81b0a8ffaa92012e63ea611e8aeb9e74acfcedac (diff)
downloadop-kernel-dev-4637fd11fff7ddca1a1d7d27d2fbfc4dcb8e9791.zip
op-kernel-dev-4637fd11fff7ddca1a1d7d27d2fbfc4dcb8e9791.tar.gz
f2fs crypto: do not set encryption policy for non-directory by ioctl
Encryption policy should only be set to an empty directory through ioctl, This patch add a judgement condition to verify type of the target inode to avoid incorrectly configuring for non-directory. Additionally, remove unneeded inline data conversion since regular or symlink file should not be processed here. Signed-off-by: Chao Yu <chao2.yu@samsung.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/file.c')
-rw-r--r--fs/f2fs/file.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index cb0d6b6..6b4ba74 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -1395,12 +1395,6 @@ static int f2fs_ioc_set_encryption_policy(struct file *filp, unsigned long arg)
sizeof(policy)))
return -EFAULT;
- if (f2fs_has_inline_data(inode)) {
- int ret = f2fs_convert_inline_inode(inode);
- if (ret)
- return ret;
- }
-
return f2fs_process_policy(&policy, inode);
#else
return -EOPNOTSUPP;
OpenPOWER on IntegriCloud