Messages in this thread Patch in this message | ![/](/images/icornerl.gif) | | Date | Sat, 16 Aug 2003 11:06:16 +0100 | From | Christoph Hellwig <> | Subject | Re: scsi proc_info called unconditionally |
| |
On Sat, Aug 16, 2003 at 10:44:09AM +0200, Olaf Hering wrote: > > Why is ->proc_info() called when the function pointer is NULL?
Looks like the check for it's presence got lost in
[PATCH] Correct removal of procfs host enteries [1/2]
Here's a trivial patch to get it back:
--- 1.32/drivers/scsi/scsi_proc.c Thu Jul 31 10:31:51 2003 +++ edited/drivers/scsi/scsi_proc.c Sat Aug 16 10:31:37 2003 @@ -81,6 +81,9 @@ void scsi_proc_hostdir_add(struct scsi_host_template *sht) { + if (!sht->proc_info) + return; + down(&global_host_template_sem); if (!sht->present++) { sht->proc_dir = proc_mkdir(sht->proc_name, proc_scsi); @@ -96,6 +99,9 @@ void scsi_proc_hostdir_rm(struct scsi_host_template *sht) { + if (!sht->proc_info) + return; + down(&global_host_template_sem); if (!--sht->present && sht->proc_dir) { remove_proc_entry(sht->proc_name, proc_scsi); - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| ![\](/images/icornerr.gif) |