PATCH: Fixes occurences of bio_size in ide_floppy.c

Alex Valys (avalys@optonline.net)
Thu, 29 Nov 2001 21:47:04 -0500


Haven't noticed this posted yet...

--- drivers/ide/ide-floppy.c.orig Thu Nov 29 21:05:56 2001
+++ drivers/ide/ide-floppy.c Thu Nov 29 21:11:44 2001
@@ -711,7 +711,7 @@
int count;

while (bcount) {
- if (pc->b_count == bio_size(bio)) {
+ if (pc->b_count == bio->bi_size) {
rq->sector += rq->current_nr_sectors;
rq->nr_sectors -= rq->current_nr_sectors;
idefloppy_end_request (1, HWGROUP(drive));
@@ -723,7 +723,8 @@
idefloppy_discard_data (drive, bcount);
return;
}
- count = IDEFLOPPY_MIN (bio_size(bio) - pc->b_count, bcount);
+ count = IDEFLOPPY_MIN (bio->bi_size - pc->b_count,
+bcount);
atapi_input_bytes (drive, bio_data(bio) + pc->b_count, count);
bcount -= count; pc->b_count += count;
}
@@ -742,7 +743,7 @@
idefloppy_end_request (1, HWGROUP(drive));
if ((bio = rq->bio) != NULL) {
pc->b_data = bio_data(bio);
- pc->b_count = bio_size(bio);
+ pc->b_count = bio->bi_size;
}
}
if (bio == NULL) {
@@ -1210,7 +1211,7 @@
pc->callback = &idefloppy_rw_callback;
pc->rq = rq;
pc->b_data = rq->buffer;
- pc->b_count = rq->cmd == READ ? 0 : bio_size(rq->bio);
+ pc->b_count = rq->cmd == READ ? 0 : rq->bio->bi_size;
if (rq->cmd == WRITE)
set_bit (PC_WRITING, &pc->flags);
pc->buffer = NULL;
-
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/