]> 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)
commit02fdf5a8f65a3066cab57bf38e2b9eb6d02ff7ab
tree1838dc350ad4a869e6aee82a00d7c9378e228bf1
parentbaed9e82f0dd65327b852803541d545e6069067d
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