contrary ide_register() lock description 2.5.69

Douglas Gilbert (dougg@torque.net)
Mon, 05 May 2003 18:25:44 +1000


The comments above ide_unregister() function definition
in lk 2.5.69 include this:

* Take care with the callbacks. These have been split to avoid
* deadlocking the IDE layer. The shutdown callback is called
* before we take the lock and free resources. It is up to the
* caller to be sure there is no pending I/O here, and that
* the interfce will not be reopened (present/vanishing locking
* isnt yet done btw). After we commit to the final kill we
* call the cleanup callback with the ide locks held.

The code that follows in ide.c shows the ide_lock
being taken prior to the shutdown callback and then
let go prior to cleanup callback. That's not what
those comments suggest.

However I do like the remaining comments in ide_unregister():

* Unregister restores the hwif structures to the default state.
* This is raving bonkers.

Doug Gilbert

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