namei: make sure nd->depth is always valid
Zero it in set_nameidata() rather than in path_init(). That way
it always matches the number of valid nd->stack[] entries.
Since terminate_walk() does zero it (after having emptied the
stack), we don't need to reinitialize it in subsequent path_init().
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Showing
Please register or sign in to comment