vfs: fix return value from do_last()
authorMiklos Szeredi <mszeredi@suse.cz>
Tue, 6 Mar 2012 12:56:34 +0000 (13:56 +0100)
committerAl Viro <viro@zeniv.linux.org.uk>
Sat, 10 Mar 2012 22:05:30 +0000 (17:05 -0500)
commit7f6c7e62fcc123e6bd9206da99a2163fe3facc31
tree1ab20c92d09849bee893a80baefa0057bbc072ed
parent097b180ca09b581ef0dc24fbcfc1b227de3875df
vfs: fix return value from do_last()

complete_walk() returns either ECHILD or ESTALE.  do_last() turns this into
ECHILD unconditionally.  If not in RCU mode, this error will reach userspace
which is complete nonsense.

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