summaryrefslogtreecommitdiffstats
path: root/sys/netsmb
diff options
context:
space:
mode:
authoravatar <avatar@FreeBSD.org>2007-07-10 09:23:10 +0000
committeravatar <avatar@FreeBSD.org>2007-07-10 09:23:10 +0000
commitc5a4c40ab239a463e08b2f25899b0d898799f15a (patch)
treee0567dceec8ae71527bc012ec4a0a697d5cc8a3e /sys/netsmb
parent379d40b2a738813d63d71be2c2972ee651e35b73 (diff)
downloadFreeBSD-src-c5a4c40ab239a463e08b2f25899b0d898799f15a.zip
FreeBSD-src-c5a4c40ab239a463e08b2f25899b0d898799f15a.tar.gz
Fixing the mount_smbfs(8) hanging by utilising the destroy_dev_sched() KPI.
Relevant threads: http://lists.freebsd.org/pipermail/freebsd-current/2007-June/074329.html Reviewed by: kib, bp (slightly different version) Tested by: Yuri Pankov <yuri.pankov at gmail dot com>, Jiawei Ye <leafy7382 at gmail dot com> Approved by: re (kensmith)
Diffstat (limited to 'sys/netsmb')
-rw-r--r--sys/netsmb/smb_dev.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/netsmb/smb_dev.c b/sys/netsmb/smb_dev.c
index 850f0ad..3181438 100644
--- a/sys/netsmb/smb_dev.c
+++ b/sys/netsmb/smb_dev.c
@@ -175,7 +175,7 @@ nsmb_dev_close(struct cdev *dev, int flag, int fmt, struct thread *td)
*/
dev->si_drv1 = NULL;
free(sdp, M_NSMBDEV);
- destroy_dev(dev);
+ destroy_dev_sched(dev);
splx(s);
return 0;
}
@@ -349,6 +349,8 @@ nsmb_dev_load(module_t mod, int cmd, void *arg)
if (error)
break;
EVENTHANDLER_DEREGISTER(dev_clone, nsmb_dev_tag);
+ drain_dev_clone_events();
+ destroy_dev_drain(&nsmb_cdevsw);
printf("netsmb_dev: unloaded\n");
break;
default:
OpenPOWER on IntegriCloud