[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200313235357.2646756-65-viro@ZenIV.linux.org.uk>
Date: Fri, 13 Mar 2020 23:53:53 +0000
From: Al Viro <viro@...IV.linux.org.uk>
To: linux-fsdevel@...r.kernel.org
Cc: linux-kernel@...r.kernel.org,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: [RFC][PATCH v4 65/69] open_last_lookups(): don't abuse complete_walk() when all we want is unlazy
From: Al Viro <viro@...iv.linux.org.uk>
Signed-off-by: Al Viro <viro@...iv.linux.org.uk>
---
fs/namei.c | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/fs/namei.c b/fs/namei.c
index a86ee06e637d..7269da642391 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -3146,15 +3146,11 @@ static const char *open_last_lookups(struct nameidata *nd,
BUG_ON(nd->flags & LOOKUP_RCU);
} else {
/* create side of things */
- /*
- * This will *only* deal with leaving RCU mode - LOOKUP_JUMPED
- * has been cleared when we got to the last component we are
- * about to look up
- */
- error = complete_walk(nd);
- if (unlikely(error))
- return ERR_PTR(error);
-
+ if (nd->flags & LOOKUP_RCU) {
+ error = unlazy_walk(nd);
+ if (unlikely(error))
+ return ERR_PTR(error);
+ }
audit_inode(nd->name, dir, AUDIT_INODE_PARENT);
/* trailing slashes? */
if (unlikely(nd->last.name[nd->last.len]))
--
2.11.0
Powered by blists - more mailing lists