diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2020-03-10 10:09:26 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2020-04-02 01:09:29 -0400 |
commit | 72287417abd16c42f1d1ea8d93ee60ba08022fc1 (patch) | |
tree | afdbcef8d045b4ec957403260387760da10947fd /fs/namei.c | |
parent | f7bb959d9623ddf9fe9cc44234c210051548ea18 (diff) | |
download | linux-72287417abd16c42f1d1ea8d93ee60ba08022fc1.tar.gz linux-72287417abd16c42f1d1ea8d93ee60ba08022fc1.tar.bz2 linux-72287417abd16c42f1d1ea8d93ee60ba08022fc1.zip |
open_last_lookups(): don't abuse complete_walk() when all we want is unlazy
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/namei.c')
-rw-r--r-- | fs/namei.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/fs/namei.c b/fs/namei.c index 6cb41608c47c..9f2d95aa2502 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -3147,15 +3147,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])) |