summaryrefslogtreecommitdiffstats
path: root/fs/jfs
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2020-09-21 08:58:39 -0700
committerDarrick J. Wong <darrick.wong@oracle.com>2020-09-21 08:59:26 -0700
commit24addd848a45747bcda68418710c72fdc8e145e4 (patch)
treee07afd743ca3b6eed585213469c3e38957eb7ac7 /fs/jfs
parent7ed3cd1a69e3aedb29d4edf0b02624a1833a952d (diff)
downloadlinux-stable-24addd848a45747bcda68418710c72fdc8e145e4.tar.gz
linux-stable-24addd848a45747bcda68418710c72fdc8e145e4.tar.bz2
linux-stable-24addd848a45747bcda68418710c72fdc8e145e4.zip
fs: Introduce i_blocks_per_page
This helper is useful for both THPs and for supporting block size larger than page size. Convert all users that I could find (we have a few different ways of writing this idiom, and I may have missed some). Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Acked-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Diffstat (limited to 'fs/jfs')
-rw-r--r--fs/jfs/jfs_metapage.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/jfs/jfs_metapage.c b/fs/jfs/jfs_metapage.c
index a2f5338a5ea1..176580f54af9 100644
--- a/fs/jfs/jfs_metapage.c
+++ b/fs/jfs/jfs_metapage.c
@@ -473,7 +473,7 @@ static int metapage_readpage(struct file *fp, struct page *page)
struct inode *inode = page->mapping->host;
struct bio *bio = NULL;
int block_offset;
- int blocks_per_page = PAGE_SIZE >> inode->i_blkbits;
+ int blocks_per_page = i_blocks_per_page(inode, page);
sector_t page_start; /* address of page in fs blocks */
sector_t pblock;
int xlen;