]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
If BENEATH is specified, always latch the topping directory vnode.
authorkib <kib@FreeBSD.org>
Thu, 29 Nov 2018 19:13:10 +0000 (19:13 +0000)
committerkib <kib@FreeBSD.org>
Thu, 29 Nov 2018 19:13:10 +0000 (19:13 +0000)
commit1d9125b01c54a43f905b7c623ff24b0b93550587
tree9875fbc7292729514d4d2052ee6f972d2e29060f
parentc0ab163d39f1eaae0be486bac0094ba207f6d451
If BENEATH is specified, always latch the topping directory vnode.

It is possible that we started with a relative path but during the
lookup, found an absolute symlink.  In this case, BENEATH handling
code needs the latch, but it is too late to calculate it.

While there, somewhat improve the assertions.  Clear the NI_LCF_LATCH
flag when the latch vnode is released, so that asserts know the state.
Assert that there is a latch if we entered beneath+abs path mode,
after the starting point is processed.

Reported by: wulf
With more input from: pho
Sponsored by: The FreeBSD Foundation
sys/kern/vfs_lookup.c