]> err.no Git - linux-2.6/commit
IDE: fix termination of non-fs requests
authorJens Axboe <jens.axboe@oracle.com>
Thu, 19 Jul 2007 06:13:01 +0000 (08:13 +0200)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Thu, 19 Jul 2007 17:22:44 +0000 (10:22 -0700)
commit41e9d344bf52c57ec16648d08618b61d3f1d4bdc
tree7d55fc863731bc669fb9ff1d50ae7c5524ef91d6
parent275afcac9953ece0828972edeab9684cfe1a5ef3
IDE: fix termination of non-fs requests

ide-disk calls

        ide_end_request(drive, 0, 0);

to finish an unknown request, but this doesn't work so well for non-fs
requests, since ide_end_request() internally looks at ->hard_cur_sectors
to see how much data to end. Only file system requests store a transfer
value in there, pc requests fill out ->data_len as a byte based transfer
value instead.

Since we ask to end 0 bytes of that request, it will never be terminated
and ide-disk gets stuck in a loop "handling" that same request over and
over.

Switch __ide_end_request() to take a byte based transfer count, and
adjust ide_end_request() to look at the right field to determine how
much IO to end when it's being passed in 0.

Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Tested-By: Giacomo Catenazzi <cate@debian.org>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/ide/ide-io.c