mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-26 21:54:11 +08:00
fs: xfs: replace BIO_MAX_SECTORS with BIO_MAX_PAGES
BIO_MAX_PAGES is used as maximum count of bvecs, so replace BIO_MAX_SECTORS with BIO_MAX_PAGES since BIO_MAX_SECTORS is to be removed. Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Ming Lei <ming.lei@canonical.com> Tested-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Jens Axboe <axboe@fb.com>
This commit is contained in:
parent
1bdc76aea1
commit
c908e38073
@ -1158,9 +1158,7 @@ xfs_buf_ioapply_map(
|
||||
|
||||
next_chunk:
|
||||
atomic_inc(&bp->b_io_remaining);
|
||||
nr_pages = BIO_MAX_SECTORS >> (PAGE_SHIFT - BBSHIFT);
|
||||
if (nr_pages > total_nr_pages)
|
||||
nr_pages = total_nr_pages;
|
||||
nr_pages = min(total_nr_pages, BIO_MAX_PAGES);
|
||||
|
||||
bio = bio_alloc(GFP_NOIO, nr_pages);
|
||||
bio->bi_bdev = bp->b_target->bt_bdev;
|
||||
|
Loading…
Reference in New Issue
Block a user