Skip to content

Commit

Permalink
restore_nameidata(): no need to clear now->stack
Browse files Browse the repository at this point in the history
microoptimization: in all callers *now is in the frame we are about to leave.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Dec 7, 2015
1 parent 248fb5b commit e1a63bb
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -534,10 +534,8 @@ static void restore_nameidata(void)
current->nameidata = old;
if (old)
old->total_link_count = now->total_link_count;
if (now->stack != now->internal) {
if (now->stack != now->internal)
kfree(now->stack);
now->stack = now->internal;
}
}

static int __nd_alloc_stack(struct nameidata *nd)
Expand Down

0 comments on commit e1a63bb

Please sign in to comment.