]> git.baikalelectronics.ru Git - kernel.git/commit
namei.c: let follow_link() do put_link() on failure
authorAl Viro <viro@zeniv.linux.org.uk>
Sun, 10 Jun 2012 08:15:17 +0000 (04:15 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Sat, 14 Jul 2012 12:32:56 +0000 (16:32 +0400)
commitf1effd230c50db5fa5c731e0f21a7e46ea7f5c59
treee94341bc903a57e1c92c03c4953ae041b87f9807
parent7ccd94b001499d8481db8373035504fece49a66e
namei.c: let follow_link() do put_link() on failure

no need for kludgy "set cookie to ERR_PTR(...) because we failed
before we did actual ->follow_link() and want to suppress put_link()",
no pointless check in put_link() itself.

Callers checked if follow_link() has failed anyway; might as well
break out of their loops if that happened, without bothering
to call put_link() first.

[AV: folded fixes from hch]

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