link_path_walk: end of nd->depth massage
authorAl Viro <viro@zeniv.linux.org.uk>
Mon, 4 May 2015 01:27:36 +0000 (21:27 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 11 May 2015 02:20:08 +0000 (22:20 -0400)
commit8eff733a45c98f17f254a313859f3b3ed9fc12dc
tree1838dc350ad4a869e6aee82a00d7c9378e228bf1
parent939724df56db970bdbaf8abcdc975c51482aba9b
link_path_walk: end of nd->depth massage

get rid of orig_depth - we only use it on error exit to tell whether
to stop doing put_link() when depth reaches 0 (call from path_init())
or when it reaches 1 (call from trailing_symlink()).  However, in
the latter case the caller would immediately follow with one more
put_link().  Just keep doing it until the depth reaches zero (and
simplify trailing_symlink() as the result).

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