summaryrefslogtreecommitdiffstats
path: root/sys/fs/smbfs
diff options
context:
space:
mode:
authordfr <dfr@FreeBSD.org>2008-04-14 09:22:48 +0000
committerdfr <dfr@FreeBSD.org>2008-04-14 09:22:48 +0000
commit24117e62964f6b8f8f4ee8d8e19dc0ffd36db0b8 (patch)
tree1608e6d923577a4c55de18a6dfd24fd1566a2b38 /sys/fs/smbfs
parenta1371575f4463ae1be202ed2dc389112c9a3c930 (diff)
downloadFreeBSD-src-24117e62964f6b8f8f4ee8d8e19dc0ffd36db0b8.zip
FreeBSD-src-24117e62964f6b8f8f4ee8d8e19dc0ffd36db0b8.tar.gz
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
Diffstat (limited to 'sys/fs/smbfs')
-rw-r--r--sys/fs/smbfs/smbfs_vnops.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/fs/smbfs/smbfs_vnops.c b/sys/fs/smbfs/smbfs_vnops.c
index d17b1d1..4d5f454 100644
--- a/sys/fs/smbfs/smbfs_vnops.c
+++ b/sys/fs/smbfs/smbfs_vnops.c
@@ -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:
OpenPOWER on IntegriCloud