mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
block: Add gfp_mask parameter to bio_integrity_clone()
Stricter gfp_mask might be required for clone allocation. For example, request-based dm may clone bio in interrupt context so it has to use GFP_ATOMIC. Signed-off-by: Kiyoshi Ueda <[email protected]> Signed-off-by: Jun'ichi Nomura <[email protected]> Acked-by: Martin K. Petersen <[email protected]> Cc: Alasdair G Kergon <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
041b62374c
commit
87092698c6
3 changed files with 6 additions and 5 deletions
|
|
@ -685,19 +685,20 @@ EXPORT_SYMBOL(bio_integrity_split);
|
|||
* bio_integrity_clone - Callback for cloning bios with integrity metadata
|
||||
* @bio: New bio
|
||||
* @bio_src: Original bio
|
||||
* @gfp_mask: Memory allocation mask
|
||||
* @bs: bio_set to allocate bip from
|
||||
*
|
||||
* Description: Called to allocate a bip when cloning a bio
|
||||
*/
|
||||
int bio_integrity_clone(struct bio *bio, struct bio *bio_src,
|
||||
struct bio_set *bs)
|
||||
gfp_t gfp_mask, struct bio_set *bs)
|
||||
{
|
||||
struct bio_integrity_payload *bip_src = bio_src->bi_integrity;
|
||||
struct bio_integrity_payload *bip;
|
||||
|
||||
BUG_ON(bip_src == NULL);
|
||||
|
||||
bip = bio_integrity_alloc_bioset(bio, GFP_NOIO, bip_src->bip_vcnt, bs);
|
||||
bip = bio_integrity_alloc_bioset(bio, gfp_mask, bip_src->bip_vcnt, bs);
|
||||
|
||||
if (bip == NULL)
|
||||
return -EIO;
|
||||
|
|
|
|||
Loading…
Reference in a new issue