dm: change ->end_io calling convention
Turn the error paramter into a pointer so that target drivers can change the value, and make sure only DM_ENDIO_* values are returned from the methods. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: Jens Axboe <axboe@fb.com>
This commit is contained in:

committed by
Jens Axboe

parent
846785e6a5
commit
1be5690984
@@ -4177,7 +4177,7 @@ static int thin_map(struct dm_target *ti, struct bio *bio)
|
||||
return thin_bio_map(ti, bio);
|
||||
}
|
||||
|
||||
static int thin_endio(struct dm_target *ti, struct bio *bio, int err)
|
||||
static int thin_endio(struct dm_target *ti, struct bio *bio, int *err)
|
||||
{
|
||||
unsigned long flags;
|
||||
struct dm_thin_endio_hook *h = dm_per_bio_data(bio, sizeof(struct dm_thin_endio_hook));
|
||||
@@ -4212,7 +4212,7 @@ static int thin_endio(struct dm_target *ti, struct bio *bio, int err)
|
||||
if (h->cell)
|
||||
cell_defer_no_holder(h->tc, h->cell);
|
||||
|
||||
return 0;
|
||||
return DM_ENDIO_DONE;
|
||||
}
|
||||
|
||||
static void thin_presuspend(struct dm_target *ti)
|
||||
|
Reference in New Issue
Block a user