- 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:
Jeff Roberson 2006-03-02 05:37:44 +00:00
parent 95d4af215e
commit 420239c773
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=156201

View File

@ -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;