yes this looks like a silly problem. the fix should be to have
ata_ar_get() set ATA_AR_RETURN in ar_flags:
if (!list_empty(&drive->free_req)) {
ar = list_ata_entry(drive->free_req.next);
list_del(&ar->ar_queue);
ata_ar_init(drive, ar);
ar->ar_flags |= ATA_AR_RETURN;
}
and then only have ata_ar_put() readd it to the list when it is set:
static inline void ata_ar_put(ide_drive_t *drive, struct ata_request
*ar)
{
if (ar->ar_flags & ATA_AR_RETURN)
list_add(&ar->ar_queue, &drive->free_req);
...
Then you can also remove the ata_ar_put() conditional in
ide_end_drive_cmd(), just call ata_ar_put() unconditionally.
> Unfortunately here my knowledge ends.
it was very helpful :-)
-- Jens Axboe- 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/