Skip to content

Commit 7228741

Browse files
author
Al Viro
committed
open_last_lookups(): don't abuse complete_walk() when all we want is unlazy
Signed-off-by: Al Viro <[email protected]>
1 parent f7bb959 commit 7228741

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

fs/namei.c

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3147,15 +3147,11 @@ static const char *open_last_lookups(struct nameidata *nd,
31473147
BUG_ON(nd->flags & LOOKUP_RCU);
31483148
} else {
31493149
/* create side of things */
3150-
/*
3151-
* This will *only* deal with leaving RCU mode - LOOKUP_JUMPED
3152-
* has been cleared when we got to the last component we are
3153-
* about to look up
3154-
*/
3155-
error = complete_walk(nd);
3156-
if (unlikely(error))
3157-
return ERR_PTR(error);
3158-
3150+
if (nd->flags & LOOKUP_RCU) {
3151+
error = unlazy_walk(nd);
3152+
if (unlikely(error))
3153+
return ERR_PTR(error);
3154+
}
31593155
audit_inode(nd->name, dir, AUDIT_INODE_PARENT);
31603156
/* trailing slashes? */
31613157
if (unlikely(nd->last.name[nd->last.len]))

0 commit comments

Comments
 (0)