[PATCH] btrfs: remove unused pages_processed variable

From: Arnd Bergmann
Date: Mon Jul 24 2023 - 08:20:19 EST


From: Arnd Bergmann <arnd@xxxxxxxx>

The only user of pages_processed was removed, so it's now a local write-only
variable that can be eliminated as well:

fs/btrfs/extent_io.c:214:16: error: variable 'pages_processed' set but not used [-Werror,-Wunused-but-set-variable]

Fixes: 9480af8687200 ("btrfs: split page locking out of __process_pages_contig")
Reported-by: kernel test robot <lkp@xxxxxxxxx>
Closes: https://lore.kernel.org/oe-kbuild-all/202307241541.8w52nEnt-lkp@xxxxxxxxx/
Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
---
fs/btrfs/extent_io.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index c0440a0988c9a..121edea2cfe85 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -211,7 +211,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;

@@ -226,7 +225,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();
--
2.39.2