diff options
author | bp <bp@FreeBSD.org> | 2005-11-22 02:15:46 +0000 |
---|---|---|
committer | bp <bp@FreeBSD.org> | 2005-11-22 02:15:46 +0000 |
commit | 9032fdcdd03f63174ba41e7d86ff25c502b2c093 (patch) | |
tree | ce7b46f18453ecf840a0b45f2b380f0038e6db8c /sys | |
parent | 88e469fc5083b70eab339b18a18b33d012773040 (diff) | |
download | FreeBSD-src-9032fdcdd03f63174ba41e7d86ff25c502b2c093.zip FreeBSD-src-9032fdcdd03f63174ba41e7d86ff25c502b2c093.tar.gz |
Prevent module unloading if there are active connections.
PR: kern/89085
Submitted by: Rostislav Krasny
MFC after: 1 week
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netsmb/smb_dev.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/netsmb/smb_dev.c b/sys/netsmb/smb_dev.c index 17994cf..d3ed95a 100644 --- a/sys/netsmb/smb_dev.c +++ b/sys/netsmb/smb_dev.c @@ -346,7 +346,8 @@ nsmb_dev_load(module_t mod, int cmd, void *arg) case MOD_UNLOAD: smb_iod_done(); error = smb_sm_done(); - error = 0; + if (error) + break; EVENTHANDLER_DEREGISTER(dev_clone, nsmb_dev_tag); printf("netsmb_dev: unloaded\n"); break; |