]> git.baikalelectronics.ru Git - kernel.git/commit
namei: lift link_path_walk() call out of trailing_symlink()
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 8 May 2015 21:37:07 +0000 (17:37 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 11 May 2015 12:12:57 +0000 (08:12 -0400)
commit00a1b69bc08e7d55527b42eb9659a400e92f0d45
treec538a12b16e7c2cbd53eff4d07c7116babf96c6f
parent6adabb25b5f8056fc62adc817063dc849bfefbcc
namei: lift link_path_walk() call out of trailing_symlink()

Make trailing_symlink() return the pathname to traverse or ERR_PTR(-E...).
A subtle point is that for "magic" symlinks it returns "" now - that
leads to link_path_walk("", nd), which is immediately returning 0 and
we are back to the treatment of the last component, at whereever the
damn thing has left us.

Reduces the stack footprint - link_path_walk() called on more shallow
stack now.

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