diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-17 08:59:33 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-17 08:59:33 -0700 |
commit | 18439c39e826191c0ef08c3a3271ce7ece46a860 (patch) | |
tree | 71594d3d002c2bb65014c21001ee5a57aac8c76a /drivers/md/dm-io.c | |
parent | 9e8912e04e612b43897b4b722205408b92f423e5 (diff) | |
parent | b35f8caa0890169000fec22902290d9a15274cbd (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm
* git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm:
dm crypt: wait for endio to complete before destruction
dm crypt: fix kcryptd_async_done parameter
dm io: respect BIO_MAX_PAGES limit
dm table: rework reference counting fix
dm ioctl: validate name length when renaming
Diffstat (limited to 'drivers/md/dm-io.c')
-rw-r--r-- | drivers/md/dm-io.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/md/dm-io.c b/drivers/md/dm-io.c index f14813be4eff..36e2b5e46a6b 100644 --- a/drivers/md/dm-io.c +++ b/drivers/md/dm-io.c @@ -292,6 +292,8 @@ static void do_region(int rw, unsigned region, struct dm_io_region *where, (PAGE_SIZE >> SECTOR_SHIFT)); num_bvecs = 1 + min_t(int, bio_get_nr_vecs(where->bdev), num_bvecs); + if (unlikely(num_bvecs > BIO_MAX_PAGES)) + num_bvecs = BIO_MAX_PAGES; bio = bio_alloc_bioset(GFP_NOIO, num_bvecs, io->client->bios); bio->bi_sector = where->sector + (where->count - remaining); bio->bi_bdev = where->bdev; |