On 06/24/13 04:36, James Bottomley wrote:
On Wed, 2013-06-12 at 14:51 +0200, Bart Van Assche wrote:
Now that all scsi_request_fn() callers hold a reference on the
SCSI device that function is invoked for
What makes you think that this is a true statement? The usual caller is
the block layer, which doesn't really know anything about the
sdev->sdev_gendev.
The reasoning behind that comment is as follows:
* The block layer guarantees that the reference count of a request
queue is >= 1 as long as a request_fn() call is in progress (see also
blk_cleanup_queue(), the __blk_drain_queue() call in that function
and the loop in __blk_drain_queue() that waits until
request_fn_active == 0).
* The SCSI core guarantees that blk_cleanup_queue() is invoked before
the final put on sdev->sdev_gendev.
Bart.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html