Skip to content

Commit 5fb60c0

Browse files
Matthew Wilcox (Oracle)Jaegeuk Kim
authored andcommitted
f2fs: Pass a folio to __has_merged_page()
All three callers have a folio so pass it in. Signed-off-by: Matthew Wilcox (Oracle) <[email protected]> Reviewed-by: Chao Yu <[email protected]> Signed-off-by: Jaegeuk Kim <[email protected]>
1 parent 06e42bf commit 5fb60c0

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

fs/f2fs/data.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -543,14 +543,14 @@ static void __submit_merged_bio(struct f2fs_bio_info *io)
543543
}
544544

545545
static bool __has_merged_page(struct bio *bio, struct inode *inode,
546-
struct page *page, nid_t ino)
546+
struct folio *folio, nid_t ino)
547547
{
548548
struct folio_iter fi;
549549

550550
if (!bio)
551551
return false;
552552

553-
if (!inode && !page && !ino)
553+
if (!inode && !folio && !ino)
554554
return true;
555555

556556
bio_for_each_folio_all(fi, bio) {
@@ -569,7 +569,7 @@ static bool __has_merged_page(struct bio *bio, struct inode *inode,
569569

570570
if (inode && inode == target->mapping->host)
571571
return true;
572-
if (page && page == &target->page)
572+
if (folio && folio == target)
573573
return true;
574574
if (ino && ino == ino_of_node(target))
575575
return true;
@@ -650,7 +650,7 @@ static void __submit_merged_write_cond(struct f2fs_sb_info *sbi,
650650
struct f2fs_bio_info *io = sbi->write_io[btype] + temp;
651651

652652
f2fs_down_read(&io->io_rwsem);
653-
ret = __has_merged_page(io->bio, inode, &folio->page, ino);
653+
ret = __has_merged_page(io->bio, inode, folio, ino);
654654
f2fs_up_read(&io->io_rwsem);
655655
}
656656
if (ret)
@@ -845,7 +845,7 @@ void f2fs_submit_merged_ipu_write(struct f2fs_sb_info *sbi,
845845
found = (target == be->bio);
846846
else
847847
found = __has_merged_page(be->bio, NULL,
848-
&folio->page, 0);
848+
folio, 0);
849849
if (found)
850850
break;
851851
}
@@ -862,7 +862,7 @@ void f2fs_submit_merged_ipu_write(struct f2fs_sb_info *sbi,
862862
found = (target == be->bio);
863863
else
864864
found = __has_merged_page(be->bio, NULL,
865-
&folio->page, 0);
865+
folio, 0);
866866
if (found) {
867867
target = be->bio;
868868
del_bio_entry(be);

0 commit comments

Comments
 (0)