]> git.baikalelectronics.ru Git - kernel.git/commit
namei: new calling conventions for walk_component()
authorAl Viro <viro@zeniv.linux.org.uk>
Mon, 4 May 2015 21:47:11 +0000 (17:47 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 11 May 2015 02:20:12 +0000 (22:20 -0400)
commit0d12c79e3b7f68041fecace19940cb4a97eea363
treecd945ed0efeddbc285f36492a97b459a7bbe32f0
parent44f73c2df298d2c2a66d0946b05d9e4f7ae825fb
namei: new calling conventions for walk_component()

instead of a single flag (!= 0 => we want to follow symlinks) pass
two bits - WALK_GET (want to follow symlinks) and WALK_PUT (put_link()
once we are done looking at the name).  The latter matters only for
success exits - on failure the caller will discard everything anyway.

Suggestions for better variant are welcome; what this thing aims for
is making sure that pending put_link() is done *before* walk_component()
decides to pick a symlink up, rather than between picking it up and
acting upon it.  See the next commit for payoff.

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