summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/namei.c
diff options
context:
space:
mode:
authorJaegeuk Kim2015-05-28 04:51:42 +0200
committerJaegeuk Kim2015-06-02 01:21:07 +0200
commite992e238ff93920da65f5aa83d3f3e257530ce8b (patch)
treecd1d23eac7e80a329d41291e9c2bc9ba303a39e4 /fs/f2fs/namei.c
parentf2fs crypto: do not set encryption policy for non-directory by ioctl (diff)
downloadkernel-qcow2-linux-e992e238ff93920da65f5aa83d3f3e257530ce8b.tar.gz
kernel-qcow2-linux-e992e238ff93920da65f5aa83d3f3e257530ce8b.tar.xz
kernel-qcow2-linux-e992e238ff93920da65f5aa83d3f3e257530ce8b.zip
f2fs crypto: avoid f2fs_inherit_context for symlink
This patch fixes to call f2fs_inherit_context twice for newly created symlink. The original one is called by f2fs_add_link(), which invokes f2fs_setxattr. If the second one is called again, f2fs_setxattr is triggered again with same encryption index. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/namei.c')
-rw-r--r--fs/f2fs/namei.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c
index 1cc24a0cbc58..83e21a174977 100644
--- a/fs/f2fs/namei.c
+++ b/fs/f2fs/namei.c
@@ -360,10 +360,6 @@ static int f2fs_symlink(struct inode *dir, struct dentry *dentry,
if (f2fs_encrypted_inode(dir)) {
struct qstr istr = QSTR_INIT(symname, len);
- err = f2fs_inherit_context(dir, inode, NULL);
- if (err)
- goto err_out;
-
err = f2fs_get_encryption_info(inode);
if (err)
goto err_out;