Messages in this thread Patch in this message |  | | Date | Thu, 12 Oct 2000 21:05:04 +0200 | From | Torben Mathiasen <> | Subject | [PATCH] Fix SCSI proc oops |
| |
Linus,
Attached patch should fix the oops's people have been getting while using /proc/scsi.
Patch is against test10p1.
-- Torben Mathiasen <tmm@kernel.dk> Linux ThunderLAN maintainer http://tlan.kernel.dk --- linux-test10p1/drivers/scsi/scsi.c Thu Oct 12 20:18:47 2000 +++ linux/drivers/scsi/scsi.c Thu Oct 12 21:03:39 2000 @@ -36,8 +36,8 @@ * out_of_space hacks, D. Gilbert (dpg) 990608 */ -#define REVISION "Revision: 1.00" -#define VERSION "Id: scsi.c 1.00 2000/09/26" +#define REVISION "Revision: 1.01" +#define VERSION "Id: scsi.c 1.01 2000/10/12" #include <linux/config.h> #include <linux/module.h> @@ -2156,7 +2156,7 @@ #endif /* Remove it from the linked list and /proc */ - if (tpnt->present) { + if (!tpnt->present) { Scsi_Host_Template **SHTp = &scsi_hosts; Scsi_Host_Template *SHT; @@ -2169,8 +2169,9 @@ } /* Rebuild the /proc/scsi directory entries */ remove_proc_entry(tpnt->proc_name, proc_scsi); + MOD_DEC_USE_COUNT; + } - MOD_DEC_USE_COUNT; } static int scsi_unregister_device(struct Scsi_Device_Template *tpnt); |  |