Skip to contentSkip to conversation

btrfs: remove redundant variable pages_processed

PATCH New Colin Ian King 1 participant 1 message Jun 2, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 btrfs: remove redundant variable pages_processed

Variable pages_processed is being accumulated but it is not being used after this. An earlier commit 6d6a31e7fc99 ("btrfs: split page locking out of __process_pages_contig") removed the check on pages_processed, so this variable is now redundant and can be removed.

---
 fs/btrfs/extent_io.c | 2 --
 1 file changed, 2 deletions(-)
fs/btrfs/extent_io.c +0 -2
index 5ed83ef4cb72..af60476c0ecf 100644
@@ -227,7 +227,6 @@ static void __process_pages_contig(struct address_space *mapping,
 	pgoff_t start_index = start >> PAGE_SHIFT;
 	pgoff_t end_index = end >> PAGE_SHIFT;
 	pgoff_t index = start_index;
-	unsigned long pages_processed = 0;
 	struct folio_batch fbatch;
 	int i;
 
@@ -242,7 +241,6 @@ static void __process_pages_contig(struct address_space *mapping,
 
 			process_one_page(fs_info, &folio->page, locked_page,
 					 page_ops, start, end);
-			pages_processed += folio_nr_pages(folio);
 		}
 		folio_batch_release(&fbatch);
 		cond_resched();
Signature · 1 line
2.30.2