mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
block: remove support for bio remapping from ->make_request
There is very little benefit in allowing to let a ->make_request instance update the bios device and sector and loop around it in __generic_make_request when we can archive the same through calling generic_make_request from the driver and letting the loop in generic_make_request handle it. Note that various drivers got the return value from ->make_request and returned non-zero values for errors. Signed-off-by: Christoph Hellwig <[email protected]> Acked-by: NeilBrown <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
c20e8de27f
commit
5a7bbad27a
25 changed files with 151 additions and 215 deletions
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
static int dcssblk_open(struct block_device *bdev, fmode_t mode);
|
||||
static int dcssblk_release(struct gendisk *disk, fmode_t mode);
|
||||
static int dcssblk_make_request(struct request_queue *q, struct bio *bio);
|
||||
static void dcssblk_make_request(struct request_queue *q, struct bio *bio);
|
||||
static int dcssblk_direct_access(struct block_device *bdev, sector_t secnum,
|
||||
void **kaddr, unsigned long *pfn);
|
||||
|
||||
|
|
@ -814,7 +814,7 @@ out:
|
|||
return rc;
|
||||
}
|
||||
|
||||
static int
|
||||
static void
|
||||
dcssblk_make_request(struct request_queue *q, struct bio *bio)
|
||||
{
|
||||
struct dcssblk_dev_info *dev_info;
|
||||
|
|
@ -871,10 +871,9 @@ dcssblk_make_request(struct request_queue *q, struct bio *bio)
|
|||
bytes_done += bvec->bv_len;
|
||||
}
|
||||
bio_endio(bio, 0);
|
||||
return 0;
|
||||
return;
|
||||
fail:
|
||||
bio_io_error(bio);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
|
|||
|
|
@ -181,7 +181,7 @@ static unsigned long xpram_highest_page_index(void)
|
|||
/*
|
||||
* Block device make request function.
|
||||
*/
|
||||
static int xpram_make_request(struct request_queue *q, struct bio *bio)
|
||||
static void xpram_make_request(struct request_queue *q, struct bio *bio)
|
||||
{
|
||||
xpram_device_t *xdev = bio->bi_bdev->bd_disk->private_data;
|
||||
struct bio_vec *bvec;
|
||||
|
|
@ -221,10 +221,9 @@ static int xpram_make_request(struct request_queue *q, struct bio *bio)
|
|||
}
|
||||
set_bit(BIO_UPTODATE, &bio->bi_flags);
|
||||
bio_endio(bio, 0);
|
||||
return 0;
|
||||
return;
|
||||
fail:
|
||||
bio_io_error(bio);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int xpram_getgeo(struct block_device *bdev, struct hd_geometry *geo)
|
||||
|
|
|
|||
Loading…
Reference in a new issue