mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-28 17:41:50 +00:00
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>
This commit is contained in:
parent
6cf66b4caf
commit
b54ffb73ca
16 changed files with 18 additions and 74 deletions
|
@ -81,7 +81,7 @@ static int __bdev_writeseg(struct super_block *sb, u64 ofs, pgoff_t index,
|
|||
unsigned int max_pages;
|
||||
int i;
|
||||
|
||||
max_pages = min(nr_pages, (size_t) bio_get_nr_vecs(super->s_bdev));
|
||||
max_pages = min(nr_pages, BIO_MAX_PAGES);
|
||||
|
||||
bio = bio_alloc(GFP_NOFS, max_pages);
|
||||
BUG_ON(!bio);
|
||||
|
@ -171,7 +171,7 @@ static int do_erase(struct super_block *sb, u64 ofs, pgoff_t index,
|
|||
unsigned int max_pages;
|
||||
int i;
|
||||
|
||||
max_pages = min(nr_pages, (size_t) bio_get_nr_vecs(super->s_bdev));
|
||||
max_pages = min(nr_pages, BIO_MAX_PAGES);
|
||||
|
||||
bio = bio_alloc(GFP_NOFS, max_pages);
|
||||
BUG_ON(!bio);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue