Skip to contentSkip to conversation

btrfs: increase usage of folio_next_index() helper

PATCH In review Minjie Du 3 participants 3 messages Jul 17, 2023 – Jul 19, 2023 Btrfs file system

lore
Share & tools
lore

Minjie Du

author
#0 lore raw

PATCH 1/1 btrfs: increase usage of folio_next_index() helper

Simplify code pattern of 'folio->index + folio_nr_pages(folio)' by using the existing helper folio_next_index().

---
 fs/btrfs/extent_io.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/btrfs/extent_io.c +1 -1
index 094004c11..d1c44e17d 100644
@@ -2127,7 +2127,7 @@ static int extent_write_cache_pages(struct address_space *mapping,
 		for (i = 0; i < nr_folios; i++) {
 			struct folio *folio = fbatch.folios[i];
 
-			done_index = folio->index + folio_nr_pages(folio);
+			done_index = folio_next_index(folio);
 			/*
 			 * At this point we hold neither the i_pages lock nor
 			 * the page lock: the page may be truncated or
Signature · 1 line
2.39.0