[PATCH] gdth.c: Adjustment for notifier-chain update

From: Alan Stern
Date: Fri Feb 17 2006 - 13:43:39 EST


This patch (as654) adds a line to gdth.c that was removed by accident as
part of the big notifier-chain update patch series.

Signed-off-by: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>

---

On Thu, 16 Feb 2006, Andrew Morton wrote:

> Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote:
> >
> > Notifier chain re-implementation (as636b): Two notifier chain callout
> > routines try to unregister themselves. The new blocking-notifier API
> > does not support this, so this patch fixes the problem by adding a new
> > flag.
>
> gdth.c has undergone a lot of rework due to a patch from Christoph Hellwig.
> That patch is fairly speculative, so my staging of your patch after his has
> put a perhaps unreasonable dependency on the notifier patches.
>
> Still, I'll leave it as-is for now, but we may need to rejig things later.
>
> Please review gdth.c in next -mm, make sure that the notifier changes in there
> still make sense (Or check the attached)

The patched source file for gdth.c you sent wasn't quite right. The
reboot-notifier block was registered but never unregistered! An extra
line of code got removed by mistake; this patch puts it back.

The driver has other issues -- it uses the old SCSI host model and it's
subject to races as a result. Really the notifier block should be
registered when the module initializes and unregistered when the module
exits. But at least this will now be no worse than it was before.

Alan Stern

--- a/drivers/scsi/gdth.c 2006-02-17 13:27:28.000000000 -0500
+++ b/drivers/scsi/gdth.c 2006-02-17 13:32:29.000000000 -0500
@@ -4729,6 +4729,7 @@ static int gdth_release(struct Scsi_Host
del_timer(&gdth_timer);
#endif
unregister_chrdev(major,"gdth");
+ unregister_reboot_notifier(&gdth_notifier);
}
}


-
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/