restore_nameidata(): no need to clear now->stack
authorAl Viro <viro@zeniv.linux.org.uk>
Sun, 6 Dec 2015 02:06:33 +0000 (21:06 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 7 Dec 2015 02:18:27 +0000 (21:18 -0500)
microoptimization: in all callers *now is in the frame we are about to leave.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/namei.c

index 0baf64b..9e102ac 100644 (file)
@@ -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)