diff options
author | un'ichi Nomura <j-nomura@ce.jp.nec.com> | 2009-03-09 05:40:52 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-03-14 16:06:51 -0400 |
commit | 87092698c665e0a358caf9825ae13114343027e8 (patch) | |
tree | 4003d12a76e1cd5b50d275a0aef536d4a86d0092 /fs/bio-integrity.c | |
parent | 041b62374c7fedc11a8a1eeda2868612d3d1436c (diff) |
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 <k-ueda@ct.jp.nec.com>
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Acked-by: Martin K. Petersen <martin.petersen@oracle.com>
Cc: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'fs/bio-integrity.c')
-rw-r--r-- | fs/bio-integrity.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/bio-integrity.c b/fs/bio-integrity.c index 549b0144da11..fe2b1aa2464e 100644 --- a/fs/bio-integrity.c +++ b/fs/bio-integrity.c | |||
@@ -685,19 +685,20 @@ EXPORT_SYMBOL(bio_integrity_split); | |||
685 | * bio_integrity_clone - Callback for cloning bios with integrity metadata | 685 | * bio_integrity_clone - Callback for cloning bios with integrity metadata |
686 | * @bio: New bio | 686 | * @bio: New bio |
687 | * @bio_src: Original bio | 687 | * @bio_src: Original bio |
688 | * @gfp_mask: Memory allocation mask | ||
688 | * @bs: bio_set to allocate bip from | 689 | * @bs: bio_set to allocate bip from |
689 | * | 690 | * |
690 | * Description: Called to allocate a bip when cloning a bio | 691 | * Description: Called to allocate a bip when cloning a bio |
691 | */ | 692 | */ |
692 | int bio_integrity_clone(struct bio *bio, struct bio *bio_src, | 693 | int bio_integrity_clone(struct bio *bio, struct bio *bio_src, |
693 | struct bio_set *bs) | 694 | gfp_t gfp_mask, struct bio_set *bs) |
694 | { | 695 | { |
695 | struct bio_integrity_payload *bip_src = bio_src->bi_integrity; | 696 | struct bio_integrity_payload *bip_src = bio_src->bi_integrity; |
696 | struct bio_integrity_payload *bip; | 697 | struct bio_integrity_payload *bip; |
697 | 698 | ||
698 | BUG_ON(bip_src == NULL); | 699 | BUG_ON(bip_src == NULL); |
699 | 700 | ||
700 | bip = bio_integrity_alloc_bioset(bio, GFP_NOIO, bip_src->bip_vcnt, bs); | 701 | bip = bio_integrity_alloc_bioset(bio, gfp_mask, bip_src->bip_vcnt, bs); |
701 | 702 | ||
702 | if (bip == NULL) | 703 | if (bip == NULL) |
703 | return -EIO; | 704 | return -EIO; |