vfs_lookup(): re-check v_mountedhere on lock upgrade
The VV_CROSSLOCK handling logic may need to upgrade the covered vnode lock depending upon the requirements of the filesystem into which vfs_lookup() is walking. This may involve transiently dropping the lock, which can allow the target mount to be unmounted. Tested by: pho Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D39272
This commit is contained in:
parent
93fe61afde
commit
0c01203e47
@ -1280,6 +1280,9 @@ vfs_lookup(struct nameidata *ndp)
|
|||||||
error = ENOENT;
|
error = ENOENT;
|
||||||
goto bad2;
|
goto bad2;
|
||||||
}
|
}
|
||||||
|
if (dp->v_mountedhere != mp) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
} else
|
} else
|
||||||
crosslkflags &= ~LK_NODDLKTREAT;
|
crosslkflags &= ~LK_NODDLKTREAT;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user