* [linux-next:master 4824/8441] fs/btrfs/extent_io.c:230:16: warning: variable 'pages_processed' set but not used
@ 2023-08-11 11:03 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-08-11 11:03 UTC (permalink / raw)
To: Christoph Hellwig
Cc: llvm, oe-kbuild-all, Linux Memory Management List, David Sterba,
Josef Bacik
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 21ef7b1e17d039053edaeaf41142423810572741
commit: e74cd6ee58375cbdd85c01c93f75e34133ebea4d [4824/8441] btrfs: split page locking out of __process_pages_contig
config: powerpc-randconfig-r031-20230811 (https://download.01.org/0day-ci/archive/20230811/202308111822.ITiKYDqp-lkp@intel.com/config)
compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07)
reproduce: (https://download.01.org/0day-ci/archive/20230811/202308111822.ITiKYDqp-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202308111822.ITiKYDqp-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> fs/btrfs/extent_io.c:230:16: warning: variable 'pages_processed' set but not used [-Wunused-but-set-variable]
unsigned long pages_processed = 0;
^
1 warning generated.
vim +/pages_processed +230 fs/btrfs/extent_io.c
ed8f13bf4a2ccb Qu Wenruo 2021-05-31 221
e74cd6ee58375c Christoph Hellwig 2023-06-28 222 static void __process_pages_contig(struct address_space *mapping,
e74cd6ee58375c Christoph Hellwig 2023-06-28 223 struct page *locked_page, u64 start, u64 end,
e74cd6ee58375c Christoph Hellwig 2023-06-28 224 unsigned long page_ops)
ed8f13bf4a2ccb Qu Wenruo 2021-05-31 225 {
e38992be1f6cf3 Qu Wenruo 2021-05-31 226 struct btrfs_fs_info *fs_info = btrfs_sb(mapping->host->i_sb);
ed8f13bf4a2ccb Qu Wenruo 2021-05-31 227 pgoff_t start_index = start >> PAGE_SHIFT;
ed8f13bf4a2ccb Qu Wenruo 2021-05-31 228 pgoff_t end_index = end >> PAGE_SHIFT;
ed8f13bf4a2ccb Qu Wenruo 2021-05-31 229 pgoff_t index = start_index;
ed8f13bf4a2ccb Qu Wenruo 2021-05-31 @230 unsigned long pages_processed = 0;
04c6b79ae4f0bc Vishal Moola (Oracle 2022-08-23 231) struct folio_batch fbatch;
ed8f13bf4a2ccb Qu Wenruo 2021-05-31 232 int i;
ed8f13bf4a2ccb Qu Wenruo 2021-05-31 233
04c6b79ae4f0bc Vishal Moola (Oracle 2022-08-23 234) folio_batch_init(&fbatch);
04c6b79ae4f0bc Vishal Moola (Oracle 2022-08-23 235) while (index <= end_index) {
04c6b79ae4f0bc Vishal Moola (Oracle 2022-08-23 236) int found_folios;
04c6b79ae4f0bc Vishal Moola (Oracle 2022-08-23 237)
04c6b79ae4f0bc Vishal Moola (Oracle 2022-08-23 238) found_folios = filemap_get_folios_contig(mapping, &index,
04c6b79ae4f0bc Vishal Moola (Oracle 2022-08-23 239) end_index, &fbatch);
04c6b79ae4f0bc Vishal Moola (Oracle 2022-08-23 240) for (i = 0; i < found_folios; i++) {
04c6b79ae4f0bc Vishal Moola (Oracle 2022-08-23 241) struct folio *folio = fbatch.folios[i];
e74cd6ee58375c Christoph Hellwig 2023-06-28 242
e74cd6ee58375c Christoph Hellwig 2023-06-28 243 process_one_page(fs_info, &folio->page, locked_page,
e74cd6ee58375c Christoph Hellwig 2023-06-28 244 page_ops, start, end);
04c6b79ae4f0bc Vishal Moola (Oracle 2022-08-23 245) pages_processed += folio_nr_pages(folio);
ed8f13bf4a2ccb Qu Wenruo 2021-05-31 246 }
04c6b79ae4f0bc Vishal Moola (Oracle 2022-08-23 247) folio_batch_release(&fbatch);
ed8f13bf4a2ccb Qu Wenruo 2021-05-31 248 cond_resched();
ed8f13bf4a2ccb Qu Wenruo 2021-05-31 249 }
ed8f13bf4a2ccb Qu Wenruo 2021-05-31 250 }
da2c7009f6cafe Liu Bo 2017-02-10 251
:::::: The code at line 230 was first introduced by commit
:::::: ed8f13bf4a2ccb6c90d3210421455c2ceae678de btrfs: refactor page status update into process_one_page()
:::::: TO: Qu Wenruo <wqu@suse.com>
:::::: CC: David Sterba <dsterba@suse.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-08-11 11:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-11 11:03 [linux-next:master 4824/8441] fs/btrfs/extent_io.c:230:16: warning: variable 'pages_processed' set but not used kernel test robot
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).