mirror of
https://github.com/opnsense/src.git
synced 2026-06-10 17:22:46 -04:00
fdescfs: allow shared locking of root vnode
Eliminates fdescfs from lock profile when running poudriere.
(cherry picked from commit 4fe925b81e)
This commit is contained in:
parent
af68d00a20
commit
8a0ec6bd40
1 changed files with 12 additions and 1 deletions
|
|
@ -107,12 +107,23 @@ fdesc_mount(struct mount *mp)
|
|||
mp->mnt_data = NULL;
|
||||
return (error);
|
||||
}
|
||||
VN_LOCK_ASHARE(rvp);
|
||||
rvp->v_type = VDIR;
|
||||
rvp->v_vflag |= VV_ROOT;
|
||||
fmp->f_root = rvp;
|
||||
VOP_UNLOCK(rvp);
|
||||
|
||||
MNT_ILOCK(mp);
|
||||
/* XXX -- don't mark as local to work around fts() problems */
|
||||
/*mp->mnt_flag |= MNT_LOCAL;*/
|
||||
/*
|
||||
* Enable shared locking so that there is no contention on the root
|
||||
* vnode. Note only root vnode enables shared locking for itself,
|
||||
* so this end up being a nop for the rest.
|
||||
*/
|
||||
mp->mnt_kern_flag |= MNTK_LOOKUP_SHARED | MNTK_EXTENDED_SHARED;
|
||||
MNT_IUNLOCK(mp);
|
||||
|
||||
vfs_getnewfsid(mp);
|
||||
|
||||
vfs_mountedfrom(mp, "fdescfs");
|
||||
|
|
@ -163,7 +174,7 @@ fdesc_root(struct mount *mp, int flags, struct vnode **vpp)
|
|||
* Return locked reference to root.
|
||||
*/
|
||||
vp = VFSTOFDESC(mp)->f_root;
|
||||
vget(vp, LK_EXCLUSIVE | LK_RETRY);
|
||||
vget(vp, flags | LK_RETRY);
|
||||
*vpp = vp;
|
||||
return (0);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue