vn_vget_ino_gen(): relock the lower vnode on error.
The function' interface assumes that the lower vnode is passed and returned locked always. Reported and tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week
This commit is contained in:
parent
c537e887ac
commit
95acb40caa
@ -2097,7 +2097,7 @@ vn_vget_ino_gen(struct vnode *vp, vn_get_ino_t alloc, void *alloc_arg,
|
||||
VOP_UNLOCK(vp, 0);
|
||||
error = alloc(mp, alloc_arg, lkflags, rvp);
|
||||
vfs_unbusy(mp);
|
||||
if (*rvp != vp)
|
||||
if (error != 0 || *rvp != vp)
|
||||
vn_lock(vp, ltype | LK_RETRY);
|
||||
if (vp->v_iflag & VI_DOOMED) {
|
||||
if (error == 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user