]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitf0cb600773bb1ba05c9f2973c659b8548a2c9d5f
tree1838dc350ad4a869e6aee82a00d7c9378e228bf1
parent98b8ae772488de3b7fa1d0a050629d7d1abf0357
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