linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* [PATCH] f2fs crypto: avoid f2fs_inherit_context for symlink
@ 2015-05-28  4:21 Jaegeuk Kim
  0 siblings, 0 replies; only message in thread
From: Jaegeuk Kim @ 2015-05-28  4:21 UTC (permalink / raw)
  To: linux-kernel, linux-fsdevel, linux-f2fs-devel; +Cc: Jaegeuk Kim

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>
---
 fs/f2fs/namei.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c
index 3188464..2c41911 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;
-- 
2.1.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-05-28  4:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-28  4:21 [PATCH] f2fs crypto: avoid f2fs_inherit_context for symlink Jaegeuk Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).