* [PATCH] btrfs: remove unused pages_processed variable
@ 2023-07-24 12:19 Arnd Bergmann
2023-07-24 14:13 ` Christoph Hellwig
2023-07-25 21:49 ` Nick Desaulniers
0 siblings, 2 replies; 5+ messages in thread
From: Arnd Bergmann @ 2023-07-24 12:19 UTC (permalink / raw)
To: Chris Mason, Josef Bacik, David Sterba
Cc: Arnd Bergmann, kernel test robot, Johannes Thumshirn, Qu Wenruo,
Anand Jain, Filipe Manana, linux-btrfs, linux-kernel
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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] btrfs: remove unused pages_processed variable
2023-07-24 12:19 [PATCH] btrfs: remove unused pages_processed variable Arnd Bergmann
@ 2023-07-24 14:13 ` Christoph Hellwig
2023-07-25 21:49 ` Nick Desaulniers
1 sibling, 0 replies; 5+ messages in thread
From: Christoph Hellwig @ 2023-07-24 14:13 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Chris Mason, Josef Bacik, David Sterba, Arnd Bergmann,
kernel test robot, Johannes Thumshirn, Qu Wenruo, Anand Jain,
Filipe Manana, linux-btrfs, linux-kernel
On Mon, Jul 24, 2023 at 02:19:15PM +0200, Arnd Bergmann wrote:
> 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:
Hmm, I thought I had fixed this up, but obviously that version didn't
end up in for-next, probably due to a faul on my side..
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] btrfs: remove unused pages_processed variable
2023-07-24 12:19 [PATCH] btrfs: remove unused pages_processed variable Arnd Bergmann
2023-07-24 14:13 ` Christoph Hellwig
@ 2023-07-25 21:49 ` Nick Desaulniers
2023-08-03 16:45 ` Nick Desaulniers
1 sibling, 1 reply; 5+ messages in thread
From: Nick Desaulniers @ 2023-07-25 21:49 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Chris Mason, Josef Bacik, David Sterba, Arnd Bergmann,
kernel test robot, Johannes Thumshirn, Qu Wenruo, Anand Jain,
Filipe Manana, linux-btrfs, linux-kernel, llvm
On Mon, Jul 24, 2023 at 02:19:15PM +0200, Arnd Bergmann wrote:
> 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>
Thanks for the patch!
Reported-by: kernelci.org bot <bot@kernelci.org>
Link: https://lore.kernel.org/llvm/64c00cd4.630a0220.6ad79.0eac@mx.google.com/
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
> ---
> 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
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] btrfs: remove unused pages_processed variable
2023-07-25 21:49 ` Nick Desaulniers
@ 2023-08-03 16:45 ` Nick Desaulniers
2023-08-10 17:20 ` David Sterba
0 siblings, 1 reply; 5+ messages in thread
From: Nick Desaulniers @ 2023-08-03 16:45 UTC (permalink / raw)
To: Chris Mason, Josef Bacik, David Sterba
Cc: Arnd Bergmann, kernel test robot, Johannes Thumshirn, Qu Wenruo,
Anand Jain, Filipe Manana, linux-btrfs, linux-kernel, llvm,
Arnd Bergmann, linux
On Tue, Jul 25, 2023 at 2:49 PM Nick Desaulniers
<ndesaulniers@google.com> wrote:
>
> On Mon, Jul 24, 2023 at 02:19:15PM +0200, Arnd Bergmann wrote:
> > 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>
>
> Thanks for the patch!
> Reported-by: kernelci.org bot <bot@kernelci.org>
> Link: https://lore.kernel.org/llvm/64c00cd4.630a0220.6ad79.0eac@mx.google.com/
> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Friendly ping the btrfs maintainers to please pick this up. Our CI
for linux-next has been red over this for longer than I like, and it's
giving me nausea, heartburn, indigestion, upset stomach, and...well...
https://youtu.be/d8InOVEsMlU
>
> > ---
> > 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
> >
--
Thanks,
~Nick Desaulniers
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] btrfs: remove unused pages_processed variable
2023-08-03 16:45 ` Nick Desaulniers
@ 2023-08-10 17:20 ` David Sterba
0 siblings, 0 replies; 5+ messages in thread
From: David Sterba @ 2023-08-10 17:20 UTC (permalink / raw)
To: Nick Desaulniers
Cc: Chris Mason, Josef Bacik, David Sterba, Arnd Bergmann,
kernel test robot, Johannes Thumshirn, Qu Wenruo, Anand Jain,
Filipe Manana, linux-btrfs, linux-kernel, llvm, Arnd Bergmann,
linux
On Thu, Aug 03, 2023 at 09:45:27AM -0700, Nick Desaulniers wrote:
> On Tue, Jul 25, 2023 at 2:49 PM Nick Desaulniers
> <ndesaulniers@google.com> wrote:
> >
> > On Mon, Jul 24, 2023 at 02:19:15PM +0200, Arnd Bergmann wrote:
> > > 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>
> >
> > Thanks for the patch!
> > Reported-by: kernelci.org bot <bot@kernelci.org>
> > Link: https://lore.kernel.org/llvm/64c00cd4.630a0220.6ad79.0eac@mx.google.com/
> > Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
>
> Friendly ping the btrfs maintainers to please pick this up.
Fix folded to the original patch, thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-08-10 17:27 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-24 12:19 [PATCH] btrfs: remove unused pages_processed variable Arnd Bergmann
2023-07-24 14:13 ` Christoph Hellwig
2023-07-25 21:49 ` Nick Desaulniers
2023-08-03 16:45 ` Nick Desaulniers
2023-08-10 17:20 ` David Sterba
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).