Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c908e380 authored by Ming Lei's avatar Ming Lei Committed by Jens Axboe
Browse files

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: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarMing Lei <ming.lei@canonical.com>
Tested-by: default avatarHannes Reinecke <hare@suse.com>
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent 1bdc76ae
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -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;