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
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=178195

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: