xfs: simplify the b_page_count calculation
authorChristoph Hellwig <hch@lst.de>
Mon, 7 Jun 2021 01:50:00 +0000 (11:50 +1000)
committerDave Chinner <david@fromorbit.com>
Mon, 7 Jun 2021 01:50:00 +0000 (11:50 +1000)
commit934d1076bb2c5bbb3d5b0e3892b208d1f537949d
tree235ff4b15a0d321cc8ecb18ba24cb252cdb12916
parent54cd3aa6f8102f4648190fc93eb5dd8603de9b52
xfs: simplify the b_page_count calculation

Ever since we stopped using the Linux page cache to back XFS buffers
there is no need to take the start sector into account for
calculating the number of pages in a buffer, as the data always
start from the beginning of the buffer.

Signed-off-by: Christoph Hellwig <hch@lst.de>
[dgc: modified to suit this series]
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
fs/xfs/xfs_buf.c