From: Andrew Morton drivers/md/dm-io.c: In function 'do_region': drivers/md/dm-io.c:296: error: 'dm_div_up' undeclared (first use in this function) drivers/md/dm-io.c:296: error: (Each undeclared identifier is reported only once drivers/md/dm-io.c:296: error: for each function it appears in.) Also, I believe this code should be using dm_sector_div_up(). Cc: "Jun'ichi Nomura" Cc: Alasdair G Kergon Signed-off-by: Andrew Morton --- drivers/md/dm-io.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff -puN drivers/md/dm-io.c~fix-agk-dm-dm-io-fix-panic-on-large-request drivers/md/dm-io.c --- a/drivers/md/dm-io.c~fix-agk-dm-dm-io-fix-panic-on-large-request +++ a/drivers/md/dm-io.c @@ -293,7 +293,8 @@ static void do_region(int rw, unsigned i * bvec for bio_get/set_region() and decrement bi_max_vecs * to hide it from bio_add_page(). */ - num_bvecs = dm_div_up(remaining / (PAGE_SIZE >> SECTOR_SHIFT)); + num_bvecs = dm_sector_div_up(remaining, + (PAGE_SIZE >> SECTOR_SHIFT)); num_bvecs = 1 + min_t(int, bio_get_nr_vecs(where->bdev), num_bvecs); bio = bio_alloc_bioset(GFP_NOIO, num_bvecs, io->client->bios); _