From: Arnd Bergmann <arnd@kernel.org>
To: Chris Mason <clm@fb.com>, Josef Bacik <josef@toxicpanda.com>,
David Sterba <dsterba@suse.com>
Cc: Arnd Bergmann <arnd@arndb.de>, kernel test robot <lkp@intel.com>,
Johannes Thumshirn <johannes.thumshirn@wdc.com>,
Qu Wenruo <wqu@suse.com>, Anand Jain <anand.jain@oracle.com>,
Filipe Manana <fdmanana@suse.com>,
linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] btrfs: remove unused pages_processed variable
Date: Mon, 24 Jul 2023 14:19:15 +0200 [thread overview]
Message-ID: <20230724121934.1406807-1-arnd@kernel.org> (raw)
From: Arnd Bergmann <arnd@arndb.de>
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@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202307241541.8w52nEnt-lkp@intel.com/
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
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
next reply other threads:[~2023-07-24 12:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-24 12:19 Arnd Bergmann [this message]
2023-07-24 14:13 ` [PATCH] btrfs: remove unused pages_processed variable Christoph Hellwig
2023-07-25 21:49 ` Nick Desaulniers
2023-08-03 16:45 ` Nick Desaulniers
2023-08-10 17:20 ` David Sterba
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230724121934.1406807-1-arnd@kernel.org \
--to=arnd@kernel.org \
--cc=anand.jain@oracle.com \
--cc=arnd@arndb.de \
--cc=clm@fb.com \
--cc=dsterba@suse.com \
--cc=fdmanana@suse.com \
--cc=johannes.thumshirn@wdc.com \
--cc=josef@toxicpanda.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=wqu@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox