Always lock the lockmgr lock when creating an smb connection object rather

than only locking it if INVARIANTS is enabled.  All the callers expect
smb_co_init() to return with the lock held.

Tested by:	"Jiawei Ye" <leafy7382 at gmail>
This commit is contained in:
John Baldwin 2006-07-17 16:12:59 +00:00
parent c67bd97df8
commit 74ed4a9a17

View File

@ -233,7 +233,8 @@ smb_co_init(struct smb_connobj *cp, int level, char *objname, struct thread *td)
lockinit(&cp->co_lock, PZERO, objname, 0, 0);
cp->co_level = level;
cp->co_usecount = 1;
KASSERT(smb_co_lock(cp, LK_EXCLUSIVE, td) == 0, ("smb_co_init: lock failed"));
if (smb_co_lock(cp, LK_EXCLUSIVE, td) != 0)
panic("smb_co_init: lock failed");
}
static void