Remove drop/reacquire of Giant around geom calls for cd9660 and udf.
Sponsored by: The FreeBSD Foundation MFC after: 2 weeks
This commit is contained in:
parent
595568b58b
commit
df5905fe7d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=300427
@ -226,11 +226,9 @@ iso_mountfs(devvp, mp)
|
|||||||
|
|
||||||
dev = devvp->v_rdev;
|
dev = devvp->v_rdev;
|
||||||
dev_ref(dev);
|
dev_ref(dev);
|
||||||
DROP_GIANT();
|
|
||||||
g_topology_lock();
|
g_topology_lock();
|
||||||
error = g_vfs_open(devvp, &cp, "cd9660", 0);
|
error = g_vfs_open(devvp, &cp, "cd9660", 0);
|
||||||
g_topology_unlock();
|
g_topology_unlock();
|
||||||
PICKUP_GIANT();
|
|
||||||
VOP_UNLOCK(devvp, 0);
|
VOP_UNLOCK(devvp, 0);
|
||||||
if (error)
|
if (error)
|
||||||
goto out;
|
goto out;
|
||||||
@ -481,11 +479,9 @@ iso_mountfs(devvp, mp)
|
|||||||
if (supbp != NULL)
|
if (supbp != NULL)
|
||||||
brelse(supbp);
|
brelse(supbp);
|
||||||
if (cp != NULL) {
|
if (cp != NULL) {
|
||||||
DROP_GIANT();
|
|
||||||
g_topology_lock();
|
g_topology_lock();
|
||||||
g_vfs_close(cp);
|
g_vfs_close(cp);
|
||||||
g_topology_unlock();
|
g_topology_unlock();
|
||||||
PICKUP_GIANT();
|
|
||||||
}
|
}
|
||||||
if (isomp) {
|
if (isomp) {
|
||||||
free(isomp, M_ISOFSMNT);
|
free(isomp, M_ISOFSMNT);
|
||||||
@ -519,11 +515,9 @@ cd9660_unmount(mp, mntflags)
|
|||||||
if (isomp->im_l2d)
|
if (isomp->im_l2d)
|
||||||
cd9660_iconv->close(isomp->im_l2d);
|
cd9660_iconv->close(isomp->im_l2d);
|
||||||
}
|
}
|
||||||
DROP_GIANT();
|
|
||||||
g_topology_lock();
|
g_topology_lock();
|
||||||
g_vfs_close(isomp->im_cp);
|
g_vfs_close(isomp->im_cp);
|
||||||
g_topology_unlock();
|
g_topology_unlock();
|
||||||
PICKUP_GIANT();
|
|
||||||
vrele(isomp->im_devvp);
|
vrele(isomp->im_devvp);
|
||||||
dev_rel(isomp->im_dev);
|
dev_rel(isomp->im_dev);
|
||||||
free(isomp, M_ISOFSMNT);
|
free(isomp, M_ISOFSMNT);
|
||||||
|
@ -325,11 +325,9 @@ udf_mountfs(struct vnode *devvp, struct mount *mp)
|
|||||||
|
|
||||||
dev = devvp->v_rdev;
|
dev = devvp->v_rdev;
|
||||||
dev_ref(dev);
|
dev_ref(dev);
|
||||||
DROP_GIANT();
|
|
||||||
g_topology_lock();
|
g_topology_lock();
|
||||||
error = g_vfs_open(devvp, &cp, "udf", 0);
|
error = g_vfs_open(devvp, &cp, "udf", 0);
|
||||||
g_topology_unlock();
|
g_topology_unlock();
|
||||||
PICKUP_GIANT();
|
|
||||||
VOP_UNLOCK(devvp, 0);
|
VOP_UNLOCK(devvp, 0);
|
||||||
if (error)
|
if (error)
|
||||||
goto bail;
|
goto bail;
|
||||||
@ -500,11 +498,9 @@ udf_mountfs(struct vnode *devvp, struct mount *mp)
|
|||||||
if (bp != NULL)
|
if (bp != NULL)
|
||||||
brelse(bp);
|
brelse(bp);
|
||||||
if (cp != NULL) {
|
if (cp != NULL) {
|
||||||
DROP_GIANT();
|
|
||||||
g_topology_lock();
|
g_topology_lock();
|
||||||
g_vfs_close(cp);
|
g_vfs_close(cp);
|
||||||
g_topology_unlock();
|
g_topology_unlock();
|
||||||
PICKUP_GIANT();
|
|
||||||
}
|
}
|
||||||
dev_rel(dev);
|
dev_rel(dev);
|
||||||
return error;
|
return error;
|
||||||
@ -533,11 +529,9 @@ udf_unmount(struct mount *mp, int mntflags)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
DROP_GIANT();
|
|
||||||
g_topology_lock();
|
g_topology_lock();
|
||||||
g_vfs_close(udfmp->im_cp);
|
g_vfs_close(udfmp->im_cp);
|
||||||
g_topology_unlock();
|
g_topology_unlock();
|
||||||
PICKUP_GIANT();
|
|
||||||
vrele(udfmp->im_devvp);
|
vrele(udfmp->im_devvp);
|
||||||
dev_rel(udfmp->im_dev);
|
dev_rel(udfmp->im_dev);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user