jbd2: replace obvious uses of b_page with b_folio
These places just use b_page to get to the buffer's address_space or have already been converted to folio. Link: https://lkml.kernel.org/r/20221215214402.3522366-10-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
11551cf15e
commit
0d22fe2f03
2 changed files with 3 additions and 7 deletions
|
@ -63,16 +63,12 @@ static void journal_end_buffer_io_sync(struct buffer_head *bh, int uptodate)
|
||||||
static void release_buffer_page(struct buffer_head *bh)
|
static void release_buffer_page(struct buffer_head *bh)
|
||||||
{
|
{
|
||||||
struct folio *folio;
|
struct folio *folio;
|
||||||
struct page *page;
|
|
||||||
|
|
||||||
if (buffer_dirty(bh))
|
if (buffer_dirty(bh))
|
||||||
goto nope;
|
goto nope;
|
||||||
if (atomic_read(&bh->b_count) != 1)
|
if (atomic_read(&bh->b_count) != 1)
|
||||||
goto nope;
|
goto nope;
|
||||||
page = bh->b_page;
|
folio = bh->b_folio;
|
||||||
if (!page)
|
|
||||||
goto nope;
|
|
||||||
folio = page_folio(page);
|
|
||||||
if (folio->mapping)
|
if (folio->mapping)
|
||||||
goto nope;
|
goto nope;
|
||||||
|
|
||||||
|
@ -1040,7 +1036,7 @@ restart_loop:
|
||||||
* already detached from the mapping and buffers cannot
|
* already detached from the mapping and buffers cannot
|
||||||
* get reused.
|
* get reused.
|
||||||
*/
|
*/
|
||||||
mapping = READ_ONCE(bh->b_page->mapping);
|
mapping = READ_ONCE(bh->b_folio->mapping);
|
||||||
if (mapping && !sb_is_blkdev_sb(mapping->host->i_sb)) {
|
if (mapping && !sb_is_blkdev_sb(mapping->host->i_sb)) {
|
||||||
clear_buffer_mapped(bh);
|
clear_buffer_mapped(bh);
|
||||||
clear_buffer_new(bh);
|
clear_buffer_new(bh);
|
||||||
|
|
|
@ -2938,7 +2938,7 @@ repeat:
|
||||||
} else {
|
} else {
|
||||||
J_ASSERT_BH(bh,
|
J_ASSERT_BH(bh,
|
||||||
(atomic_read(&bh->b_count) > 0) ||
|
(atomic_read(&bh->b_count) > 0) ||
|
||||||
(bh->b_page && bh->b_page->mapping));
|
(bh->b_folio && bh->b_folio->mapping));
|
||||||
|
|
||||||
if (!new_jh) {
|
if (!new_jh) {
|
||||||
jbd_unlock_bh_journal_head(bh);
|
jbd_unlock_bh_journal_head(bh);
|
||||||
|
|
Loading…
Add table
Reference in a new issue