Re: Linux 2.6.9-ac3

From: Jens Axboe
Date: Fri Oct 22 2004 - 01:43:53 EST


On Fri, Oct 22 2004, Alan Cox wrote:
> ftp://ftp.kernel.org/pub/linux/kernel/people/alan/linux-2.6/2.6.9/

If you're collection ide patchlets for later inclusion, please include
this as well. It makes sure we remove the ideX directory in proc when an
interface is removed. With ide-cs and repeated insert/reject cycles, we
end up with tons of ide2 entries.

Signed-off-by: Jens Axboe <axboe@xxxxxxx>

--- /opt/kernel/linux-2.6/include/linux/ide.h 2004-10-11 12:19:40.000000000 +0200
+++ linux-2.6.9/include/linux/ide.h 2004-10-20 17:25:05.000000000 +0200
@@ -1063,6 +1063,7 @@
extern void proc_ide_create(void);
extern void proc_ide_destroy(void);
extern void destroy_proc_ide_drives(ide_hwif_t *);
+extern void destroy_proc_ide_interfaces(void);
extern void create_proc_ide_interfaces(void);
extern void ide_add_proc_entries(struct proc_dir_entry *, ide_proc_entry_t *, void *);
extern void ide_remove_proc_entries(struct proc_dir_entry *, ide_proc_entry_t *);
--- /opt/kernel/linux-2.6/drivers/ide/ide.c 2004-10-11 12:19:29.000000000 +0200
+++ linux-2.6.9/drivers/ide/ide.c 2004-10-20 17:25:54.000000000 +0200
@@ -798,6 +798,7 @@

#ifdef CONFIG_PROC_FS
destroy_proc_ide_drives(hwif);
+ destroy_proc_ide_interfaces();
#endif

hwgroup = hwif->hwgroup;
--- /opt/kernel/linux-2.6/drivers/ide/ide-proc.c 2004-10-11 12:19:29.000000000 +0200
+++ linux-2.6.9/drivers/ide/ide-proc.c 2004-10-20 17:31:02.040529272 +0200
@@ -731,10 +731,9 @@
for (h = 0; h < MAX_HWIFS; h++) {
ide_hwif_t *hwif = &ide_hwifs[h];
int exist = (hwif->proc != NULL);
-#if 0
- if (!hwif->present)
+
+ if (hwif->present)
continue;
-#endif
if (exist) {
destroy_proc_ide_drives(hwif);
ide_remove_proc_entries(hwif->proc, hwif_entries);

--
Jens Axboe

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/