Skip to contentSkip to conversation

f2fs crypto: avoid f2fs_inherit_context for symlink

PATCH New Jaegeuk Kim 1 participant 1 message May 28, 2015

Subsystems (2)
lore
Share & tools
lore

Jaegeuk Kim

author maintainer
#0 lore raw

PATCH 1/1 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.

---
 fs/f2fs/namei.c | 4 ----
 1 file changed, 4 deletions(-)
fs/f2fs/namei.c +0 -4
index 3188464..2c41911 100644
@@ -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;
Signature · 1 line
2.1.1