diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2015-05-19 14:31:01 +0200 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2015-08-13 20:32:04 +0200 |
commit | b54ffb73cadcdcff9cc1ae0e11f502407e3e2e4c (patch) | |
tree | 8a6d90b3e092e598fefd34718afd2198d8bff2a7 /fs/btrfs/compression.c | |
parent | fs: use helper bio_add_page() instead of open coding on bi_io_vec (diff) | |
download | linux-b54ffb73cadcdcff9cc1ae0e11f502407e3e2e4c.tar.xz linux-b54ffb73cadcdcff9cc1ae0e11f502407e3e2e4c.zip |
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/btrfs/compression.c')
-rw-r--r-- | fs/btrfs/compression.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c index 302266ec2cdb..57ee8ca29b06 100644 --- a/fs/btrfs/compression.c +++ b/fs/btrfs/compression.c @@ -97,10 +97,7 @@ static inline int compressed_bio_size(struct btrfs_root *root, static struct bio *compressed_bio_alloc(struct block_device *bdev, u64 first_byte, gfp_t gfp_flags) { - int nr_vecs; - - nr_vecs = bio_get_nr_vecs(bdev); - return btrfs_bio_alloc(bdev, first_byte >> 9, nr_vecs, gfp_flags); + return btrfs_bio_alloc(bdev, first_byte >> 9, BIO_MAX_PAGES, gfp_flags); } static int check_compressed_csum(struct inode *inode, |