summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2015-05-19 16:11:40 -0700
committerJaegeuk Kim <jaegeuk@kernel.org>2015-06-01 16:21:02 -0700
commit304eecc3462ed62006433d04e3ad945f92f90d52 (patch)
tree0994d212f3d6b0b26f5fe6c2172416c733674878 /fs
parent7e01e7ad746bc8198a8b46163ddc73a1c7d22339 (diff)
downloadop-kernel-dev-304eecc3462ed62006433d04e3ad945f92f90d52.zip
op-kernel-dev-304eecc3462ed62006433d04e3ad945f92f90d52.tar.gz
f2fs crypto: check encryption for tmpfile
This patch adds to check encryption for tmpfile in early stage. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/f2fs/namei.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c
index 6edad57..a316783 100644
--- a/fs/f2fs/namei.c
+++ b/fs/f2fs/namei.c
@@ -569,6 +569,12 @@ out:
static int f2fs_tmpfile(struct inode *dir, struct dentry *dentry, umode_t mode)
{
+ if (f2fs_encrypted_inode(dir)) {
+ int err = f2fs_get_encryption_info(dir);
+ if (err)
+ return err;
+ }
+
return __f2fs_tmpfile(dir, dentry, mode, NULL);
}
OpenPOWER on IntegriCloud