diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2015-05-19 08:31:01 -0400 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2015-08-13 14:32:04 -0400 |
commit | b54ffb73cadcdcff9cc1ae0e11f502407e3e2e4c (patch) | |
tree | 8a6d90b3e092e598fefd34718afd2198d8bff2a7 /fs/ext4/page-io.c | |
parent | 6cf66b4caf9c71f64a5486cadbd71ab58d0d4307 (diff) |
block: remove bio_get_nr_vecs()
We can always fill up the bio now, no need to estimate the possible
size based on queue parameters.
Acked-by: Steven Whitehouse <swhiteho@redhat.com>
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
[hch: rebased and wrote a changelog]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ming Lin <ming.l@ssi.samsung.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'fs/ext4/page-io.c')
-rw-r--r-- | fs/ext4/page-io.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/ext4/page-io.c b/fs/ext4/page-io.c index aa95566f14be..8a9d63a0c071 100644 --- a/fs/ext4/page-io.c +++ b/fs/ext4/page-io.c | |||
@@ -372,10 +372,9 @@ void ext4_io_submit_init(struct ext4_io_submit *io, | |||
372 | static int io_submit_init_bio(struct ext4_io_submit *io, | 372 | static int io_submit_init_bio(struct ext4_io_submit *io, |
373 | struct buffer_head *bh) | 373 | struct buffer_head *bh) |
374 | { | 374 | { |
375 | int nvecs = bio_get_nr_vecs(bh->b_bdev); | ||
376 | struct bio *bio; | 375 | struct bio *bio; |
377 | 376 | ||
378 | bio = bio_alloc(GFP_NOIO, min(nvecs, BIO_MAX_PAGES)); | 377 | bio = bio_alloc(GFP_NOIO, BIO_MAX_PAGES); |
379 | if (!bio) | 378 | if (!bio) |
380 | return -ENOMEM; | 379 | return -ENOMEM; |
381 | bio->bi_iter.bi_sector = bh->b_blocknr * (bh->b_size >> 9); | 380 | bio->bi_iter.bi_sector = bh->b_blocknr * (bh->b_size >> 9); |