Re: 2.4.21-pre1 broke the ide-tape driver

Mikael Pettersson (mikpe@csd.uu.se)
Fri, 20 Dec 2002 19:04:01 +0100 (MET)


On Thu, 19 Dec 2002 18:08:15 -0200 (BRST), Marcelo Tosatti wrote:
>> - ide-disk/ide-floppy do the test&call inside the loop rather than after,
>> so possibly the call should be moved into the loop, and augmented
>> to be "if (drive && drive->proc) ide_remove_proc_entries(...)".
>
>Yes... here is a patch which moves the ide_remove_proc_entries inside the
>detection loop. Without ide_remove_proc_entries inside the loop we would
>also not unregister more than one device /proc entries, too.
>
>Please test it, works for me.

Tested. Works for me too.

/Mikael

>
>--- linux-bk/drivers/ide/ide-tape.c 2002-12-19 18:05:07.000000000 -0200
>+++ linux-2.4.21/drivers/ide/ide-tape.c 2002-12-19 17:59:39.000000000 -0200
>@@ -6597,14 +6597,16 @@
>
> for (minor = 0; minor < MAX_HWIFS * MAX_DRIVES; minor++) {
> drive = idetape_chrdevs[minor].drive;
>- if (drive != NULL && idetape_cleanup(drive))
>- printk(KERN_ERR "ide-tape: %s: cleanup_module() "
>- "called while still busy\n", drive->name);
>- }
>+ if (drive) {
>+ if (idetape_cleanup(drive))
>+ printk(KERN_ERR "ide-tape: %s: cleanup_module() "
>+ "called while still busy\n", drive->name);
> #ifdef CONFIG_PROC_FS
>- if (drive->proc)
>- ide_remove_proc_entries(drive->proc, idetape_proc);
>+ if (drive->proc)
>+ ide_remove_proc_entries(drive->proc, idetape_proc);
> #endif
>+ }
>+ }
>
> ide_unregister_module(&idetape_module);
> }
>
-
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/