diff options
author | Kent Overstreet <koverstreet@google.com> | 2012-09-06 18:34:56 -0400 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2012-09-09 04:35:38 -0400 |
commit | 1e2a410ff71504a64d1af2e354287ac51aeac1b0 (patch) | |
tree | e4ae4669d958fc932e5ae67cafd8de860f1f91c9 /drivers/md | |
parent | 395c72a707d966b36d5a42fe12c3a237ded3a0d9 (diff) |
block: Ues bi_pool for bio_integrity_alloc()
Now that bios keep track of where they were allocated from,
bio_integrity_alloc_bioset() becomes redundant.
Remove bio_integrity_alloc_bioset() and drop bio_set argument from the
related functions and make them use bio->bi_pool.
Signed-off-by: Kent Overstreet <koverstreet@google.com>
CC: Jens Axboe <axboe@kernel.dk>
CC: Martin K. Petersen <martin.petersen@oracle.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/dm.c | 4 | ||||
-rw-r--r-- | drivers/md/md.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 0c3d6dd51897..f43aaf689bd0 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c | |||
@@ -1068,7 +1068,7 @@ static struct bio *split_bvec(struct bio *bio, sector_t sector, | |||
1068 | clone->bi_flags |= 1 << BIO_CLONED; | 1068 | clone->bi_flags |= 1 << BIO_CLONED; |
1069 | 1069 | ||
1070 | if (bio_integrity(bio)) { | 1070 | if (bio_integrity(bio)) { |
1071 | bio_integrity_clone(clone, bio, GFP_NOIO, bs); | 1071 | bio_integrity_clone(clone, bio, GFP_NOIO); |
1072 | bio_integrity_trim(clone, | 1072 | bio_integrity_trim(clone, |
1073 | bio_sector_offset(bio, idx, offset), len); | 1073 | bio_sector_offset(bio, idx, offset), len); |
1074 | } | 1074 | } |
@@ -1094,7 +1094,7 @@ static struct bio *clone_bio(struct bio *bio, sector_t sector, | |||
1094 | clone->bi_flags &= ~(1 << BIO_SEG_VALID); | 1094 | clone->bi_flags &= ~(1 << BIO_SEG_VALID); |
1095 | 1095 | ||
1096 | if (bio_integrity(bio)) { | 1096 | if (bio_integrity(bio)) { |
1097 | bio_integrity_clone(clone, bio, GFP_NOIO, bs); | 1097 | bio_integrity_clone(clone, bio, GFP_NOIO); |
1098 | 1098 | ||
1099 | if (idx != bio->bi_idx || clone->bi_size < bio->bi_size) | 1099 | if (idx != bio->bi_idx || clone->bi_size < bio->bi_size) |
1100 | bio_integrity_trim(clone, | 1100 | bio_integrity_trim(clone, |
diff --git a/drivers/md/md.c b/drivers/md/md.c index b8eebe357b2b..457ca8451ddb 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -186,7 +186,7 @@ struct bio *bio_clone_mddev(struct bio *bio, gfp_t gfp_mask, | |||
186 | if (bio_integrity(bio)) { | 186 | if (bio_integrity(bio)) { |
187 | int ret; | 187 | int ret; |
188 | 188 | ||
189 | ret = bio_integrity_clone(b, bio, gfp_mask, mddev->bio_set); | 189 | ret = bio_integrity_clone(b, bio, gfp_mask); |
190 | 190 | ||
191 | if (ret < 0) { | 191 | if (ret < 0) { |
192 | bio_put(b); | 192 | bio_put(b); |