f2fs crypto: do not set encryption policy for non-directory by ioctl
authorChao Yu <chao2.yu@samsung.com>
Wed, 27 May 2015 07:27:49 +0000 (15:27 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Mon, 1 Jun 2015 23:21:07 +0000 (16:21 -0700)
commit4637fd11fff7ddca1a1d7d27d2fbfc4dcb8e9791
tree0a619be7025b1b291653962eb580d77ed04f150b
parent81b0a8ffaa92012e63ea611e8aeb9e74acfcedac
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>
fs/f2fs/crypto_policy.c
fs/f2fs/file.c