summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/namei.c
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2017-11-29 12:35:29 -0800
committerJaegeuk Kim <jaegeuk@kernel.org>2018-01-02 19:27:28 -0800
commitb05157e772589a5ef315ead84c95c43a7844a2b6 (patch)
tree315ed6d53ee8d1aa4b973a8c10d4691208101fa1 /fs/f2fs/namei.c
parent2e168c82dc32e02c0d4774cbae4f07d98ff51649 (diff)
downloadtalos-obmc-linux-b05157e772589a5ef315ead84c95c43a7844a2b6.tar.gz
talos-obmc-linux-b05157e772589a5ef315ead84c95c43a7844a2b6.zip
f2fs: switch to fscrypt_prepare_link()
Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/namei.c')
-rw-r--r--fs/f2fs/namei.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c
index 28bdf8828e73..dcf5c3a97059 100644
--- a/fs/f2fs/namei.c
+++ b/fs/f2fs/namei.c
@@ -240,9 +240,9 @@ static int f2fs_link(struct dentry *old_dentry, struct inode *dir,
if (unlikely(f2fs_cp_error(sbi)))
return -EIO;
- if (f2fs_encrypted_inode(dir) &&
- !fscrypt_has_permitted_context(dir, inode))
- return -EPERM;
+ err = fscrypt_prepare_link(old_dentry, dir, dentry);
+ if (err)
+ return err;
if (is_inode_flag_set(dir, FI_PROJ_INHERIT) &&
(!projid_eq(F2FS_I(dir)->i_projid,
OpenPOWER on IntegriCloud