gdth.c: Adjustment for notifier-chain update
PATCH 1/1 gdth.c: Adjustment for notifier-chain update
In reply to a message not in the archiveThis patch (as654) adds a line to gdth.c that was removed by accident as part of the big notifier-chain update patch series.
---
Quoted 7 lines · Andrew Morton
Quoted 5 lines · Alan Stern
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.
Quoted 8 lines
gdth.chas 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.cin 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
drivers/scsi/gdth.c +1 -0
@@ -4729,6 +4729,7 @@ static int gdth_release(struct Scsi_Hostdel_timer (&gdth_timer);#endif unregister_chrdev (major,"gdth" ); +unregister_reboot_notifier (&gdth_notifier); } }