nullfs: don't pre lock exclusive in nullfs_root

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D23955
This commit is contained in:
Mateusz Guzik 2020-03-04 19:52:00 +00:00
parent ca25195805
commit 625adeaccd
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=358633

View File

@ -281,13 +281,10 @@ nullfs_root(mp, flags, vpp)
NULLFSDEBUG("nullfs_root(mp = %p, vp = %p)\n", mp,
mntdata->nullm_lowerrootvp);
error = vget(mntdata->nullm_lowerrootvp, (flags & ~LK_TYPE_MASK) |
LK_EXCLUSIVE, curthread);
error = vget(mntdata->nullm_lowerrootvp, flags, curthread);
if (error == 0) {
error = null_nodeget(mp, mntdata->nullm_lowerrootvp, &vp);
if (error == 0) {
if ((flags & LK_TYPE_MASK) == LK_SHARED)
vn_lock(vp, LK_DOWNGRADE | LK_RETRY);
*vpp = vp;
}
}