]> git.ipfire.org Git - people/ms/linux.git/commit - fs/namei.c
teach set_nameidata() to handle setting the root as well
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 2 Apr 2021 02:28:03 +0000 (22:28 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 7 Apr 2021 17:57:16 +0000 (13:57 -0400)
commit06422964c8820233e9abd4ab8c6846e2b881b0b7
treea9248ba6065d2b6a2cef7033a417ab141a3c51ba
parentbcba1e7d0d520adba895d9e0800a056f734b0a6a
teach set_nameidata() to handle setting the root as well

That way we don't need the callers to mess with manually setting any fields
of nameidata instances.  Old set_nameidata() gets renamed (__set_nameidata()),
new becomes an inlined helper that takes a struct path pointer and deals
with setting nd->root and putting ND_ROOT_PRESET in nd->state when new
argument is non-NULL.

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