When calling lf_advlock to unlock a record, make sure that ap->a_fl->l_type

is F_UNLCK otherwise we trigger a LOCKF_DEBUG panic.

MFC after: 3 days
This commit is contained in:
Doug Rabson 2008-04-14 09:22:48 +00:00
parent fa4b421a7a
commit 18121c17f5

View File

@ -1014,8 +1014,11 @@ smbfs_advlock(ap)
lkop = SMB_LOCK_EXCL;
error = smbfs_smb_lock(np, lkop, id, start, end, &scred);
if (error) {
int oldtype = fl->l_type;
fl->l_type = F_UNLCK;
ap->a_op = F_UNLCK;
lf_advlock(ap, &np->n_lockf, size);
fl->l_type = oldtype;
}
break;
case F_UNLCK: