summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorMing Lei <ming.lei@canonical.com>2016-05-30 21:34:33 +0800
committerJens Axboe <axboe@fb.com>2016-06-09 10:02:47 -0600
commitc908e38073992053949cedecca9c83b5300bbb3a (patch)
tree8673db8914f29fa1364c615552ed0e7209561b96 /fs
parent1bdc76aea1159a750846c2fc98e404403eb7d51c (diff)
downloadlinux-stable-c908e38073992053949cedecca9c83b5300bbb3a.tar.gz
linux-stable-c908e38073992053949cedecca9c83b5300bbb3a.tar.bz2
linux-stable-c908e38073992053949cedecca9c83b5300bbb3a.zip
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>
Diffstat (limited to 'fs')
-rw-r--r--fs/xfs/xfs_buf.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c
index 686d8f160f5c..a87a0d5477bd 100644
--- a/fs/xfs/xfs_buf.c
+++ b/fs/xfs/xfs_buf.c
@@ -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;