summaryrefslogtreecommitdiffstats
path: root/fs/jfs
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2024-04-17 19:56:49 +0200
committerDave Kleikamp <dave.kleikamp@oracle.com>2024-05-24 17:26:05 +0200
commit40e1bd195b0ee3880699bb0ae1897e9f9116aa29 (patch)
treee7614e94a05ec51e61900e43bbf496a9c7b013f0 /fs/jfs
parentjfs: Convert insert_metapage() to take a folio (diff)
downloadlinux-40e1bd195b0ee3880699bb0ae1897e9f9116aa29.tar.xz
linux-40e1bd195b0ee3880699bb0ae1897e9f9116aa29.zip
jfs; Convert release_metapage to use a folio
Convert mp->page to a folio and remove 7 hidden calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Diffstat (limited to 'fs/jfs')
-rw-r--r--fs/jfs/jfs_metapage.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/fs/jfs/jfs_metapage.c b/fs/jfs/jfs_metapage.c
index 6fa7023f5bc9..4515dc1ac40e 100644
--- a/fs/jfs/jfs_metapage.c
+++ b/fs/jfs/jfs_metapage.c
@@ -749,37 +749,35 @@ void put_metapage(struct metapage *mp)
void release_metapage(struct metapage * mp)
{
- struct page *page = mp->page;
+ struct folio *folio = page_folio(mp->page);
jfs_info("release_metapage: mp = 0x%p, flag = 0x%lx", mp, mp->flag);
- BUG_ON(!page);
-
- lock_page(page);
+ folio_lock(folio);
unlock_metapage(mp);
assert(mp->count);
if (--mp->count || mp->nohomeok) {
- unlock_page(page);
- put_page(page);
+ folio_unlock(folio);
+ folio_put(folio);
return;
}
if (test_bit(META_dirty, &mp->flag)) {
- set_page_dirty(page);
+ folio_mark_dirty(folio);
if (test_bit(META_sync, &mp->flag)) {
clear_bit(META_sync, &mp->flag);
- if (metapage_write_one(page))
+ if (metapage_write_one(&folio->page))
jfs_error(mp->sb, "metapage_write_one() failed\n");
- lock_page(page);
+ folio_lock(folio);
}
} else if (mp->lsn) /* discard_metapage doesn't remove it */
remove_from_logsync(mp);
/* Try to keep metapages from using up too much memory */
- drop_metapage(page, mp);
+ drop_metapage(&folio->page, mp);
- unlock_page(page);
- put_page(page);
+ folio_unlock(folio);
+ folio_put(folio);
}
void __invalidate_metapages(struct inode *ip, s64 addr, int len)