vfs: do_last(): make exit RCU safe
authorMiklos Szeredi <mszeredi@suse.cz>
Mon, 21 May 2012 15:30:06 +0000 (17:30 +0200)
committerAl Viro <viro@zeniv.linux.org.uk>
Fri, 1 Jun 2012 16:11:57 +0000 (12:11 -0400)
Allow returning from do_last() with LOOKUP_RCU still set on the "out:" and
"exit:" labels.

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

index 7f4ab820811a0992a34332542146fc8cf718d06c..edc18cd63a88841c8cd494242102cf2f0ce8affb 100644 (file)
@@ -2383,7 +2383,7 @@ common:
 out:
        if (want_write)
                mnt_drop_write(nd->path.mnt);
-       path_put(&nd->path);
+       terminate_walk(nd);
        return filp;
 
 exit_mutex_unlock: