mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-04 01:38:57 +00:00
- Lock Giant if needed around the call to vnode_create_vobject(). This is
only important if devfs is not mpsafe. Sponsored by: Isilon Systems, Inc. Found by: kris
This commit is contained in:
parent
95d4af215e
commit
420239c773
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=156201
@ -131,6 +131,7 @@ g_vfs_open(struct vnode *vp, struct g_consumer **cpp, const char *fsname, int wr
|
||||
struct g_provider *pp;
|
||||
struct g_consumer *cp;
|
||||
struct bufobj *bo;
|
||||
int vfslocked;
|
||||
int error;
|
||||
|
||||
g_topology_assert();
|
||||
@ -147,7 +148,9 @@ g_vfs_open(struct vnode *vp, struct g_consumer **cpp, const char *fsname, int wr
|
||||
g_wither_geom(gp, ENXIO);
|
||||
return (error);
|
||||
}
|
||||
vfslocked = VFS_LOCK_GIANT(vp->v_mount);
|
||||
vnode_create_vobject(vp, pp->mediasize, curthread);
|
||||
VFS_UNLOCK_GIANT(vfslocked);
|
||||
*cpp = cp;
|
||||
bo = &vp->v_bufobj;
|
||||
bo->bo_ops = g_vfs_bufops;
|
||||
|
Loading…
Reference in New Issue
Block a user