]> git.baikalelectronics.ru Git - kernel.git/commit
follow_dotdot(): be lazy about changing nd->path
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 28 Feb 2020 15:17:52 +0000 (10:17 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 2 Apr 2020 05:09:21 +0000 (01:09 -0400)
commitfa4af6435be9a84c14b1aaa2e7b495b7a6ab4b9f
tree902a294e9a8e8cc86d7320b434c8411f59fd8e44
parentf3597c5e64c945ee6f445d7387a4f8f263f67b2d
follow_dotdot(): be lazy about changing nd->path

Change nd->path only after the loop is done and only in case we hadn't
ended up finding ourselves in root.  Same for NO_XDEV check.

That separates the "check how far back do we need to go through the
mount stack" logics from the rest of .. traversal.

NOTE: path_get/path_put introduced here are temporary.  They will
go away later in the series.

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