diff options
Diffstat (limited to 'fs/jfs/inode.c')
-rw-r--r-- | fs/jfs/inode.c | 29 |
1 files changed, 5 insertions, 24 deletions
diff --git a/fs/jfs/inode.c b/fs/jfs/inode.c index d1943a7b4b04..259326556ada 100644 --- a/fs/jfs/inode.c +++ b/fs/jfs/inode.c @@ -224,18 +224,9 @@ int jfs_get_block(struct inode *ip, sector_t lblock, * this as a hole */ goto unlock; -#ifdef _JFS_4K XADoffset(&xad, lblock64); XADlength(&xad, xlen); XADaddress(&xad, xaddr); -#else /* _JFS_4K */ - /* - * As long as block size = 4K, this isn't a problem. - * We should mark the whole page not ABNR, but how - * will we know to mark the other blocks BH_New? - */ - BUG(); -#endif /* _JFS_4K */ rc = extRecord(ip, &xad); if (rc) goto unlock; @@ -252,7 +243,6 @@ int jfs_get_block(struct inode *ip, sector_t lblock, /* * Allocate a new block */ -#ifdef _JFS_4K if ((rc = extHint(ip, lblock64 << ip->i_sb->s_blocksize_bits, &xad))) goto unlock; rc = extAlloc(ip, xlen, lblock64, &xad, false); @@ -263,14 +253,6 @@ int jfs_get_block(struct inode *ip, sector_t lblock, map_bh(bh_result, ip->i_sb, addressXAD(&xad)); bh_result->b_size = lengthXAD(&xad) << ip->i_blkbits; -#else /* _JFS_4K */ - /* - * We need to do whatever it takes to keep all but the last buffers - * in 4K pages - see jfs_write.c - */ - BUG(); -#endif /* _JFS_4K */ - unlock: /* * Release lock on inode @@ -293,9 +275,9 @@ static int jfs_writepages(struct address_space *mapping, return mpage_writepages(mapping, wbc, jfs_get_block); } -static int jfs_readpage(struct file *file, struct page *page) +static int jfs_read_folio(struct file *file, struct folio *folio) { - return mpage_readpage(page, jfs_get_block); + return mpage_read_folio(folio, jfs_get_block); } static void jfs_readahead(struct readahead_control *rac) @@ -314,13 +296,12 @@ static void jfs_write_failed(struct address_space *mapping, loff_t to) } static int jfs_write_begin(struct file *file, struct address_space *mapping, - loff_t pos, unsigned len, unsigned flags, + loff_t pos, unsigned len, struct page **pagep, void **fsdata) { int ret; - ret = nobh_write_begin(mapping, pos, len, flags, pagep, fsdata, - jfs_get_block); + ret = nobh_write_begin(mapping, pos, len, pagep, fsdata, jfs_get_block); if (unlikely(ret)) jfs_write_failed(mapping, pos + len); @@ -360,7 +341,7 @@ static ssize_t jfs_direct_IO(struct kiocb *iocb, struct iov_iter *iter) const struct address_space_operations jfs_aops = { .dirty_folio = block_dirty_folio, .invalidate_folio = block_invalidate_folio, - .readpage = jfs_readpage, + .read_folio = jfs_read_folio, .readahead = jfs_readahead, .writepage = jfs_writepage, .writepages = jfs_writepages, |