]> git.baikalelectronics.ru Git - kernel.git/commit
fix EOPENSTALE bug in do_last()
authorAl Viro <viro@zeniv.linux.org.uk>
Sat, 4 Jun 2016 15:41:49 +0000 (11:41 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Sat, 4 Jun 2016 15:59:04 +0000 (11:59 -0400)
commit8837080f0dcde7b1ed53477440c23aaff36fb1d8
tree3a4a73d44e6ed62674cd5ae4ccf57fb3bac25d0d
parenteafb69e30fd2c5eb541ab8464cb7c24186e23039
fix EOPENSTALE bug in do_last()

EOPENSTALE occuring at the last component of a trailing symlink ends up
with do_last() retrying its lookup.  After the symlink body has been
discarded.  The thing is, all this retry_lookup logics in there is not
needed at all - the upper layers will do the right thing if we simply
return that -EOPENSTALE as we would with any other error.  Trying to
microoptimize in do_last() is a lot of headache for no good reason.

Cc: stable@vger.kernel.org # v4.2+
Tested-by: Oleg Drokin <green@linuxhacker.ru>
Reviewed-and-Tested-by: Jeff Layton <jlayton@poochiereds.net>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/namei.c