* [dhowells-fs:netfs-writeback 17/22] fs/netfs/write_collect.c:110 netfs_writeback_lookup_folio() error: we previously assumed 'folio' could be null (see line 99)
@ 2024-03-23 13:55 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-03-23 13:55 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp, Dan Carpenter
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: David Howells <dhowells@redhat.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git netfs-writeback
head: 6d4dafd8301ee8645d4814a7e75a9135acf67613
commit: 52ff5a10870495fafb8bdf0ee2e987d861b1b42c [17/22] netfs, 9p: Implement helpers for new write code
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago
config: sparc64-randconfig-r081-20240323 (https://download.01.org/0day-ci/archive/20240323/202403232142.egfToXYX-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 13.2.0
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>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202403232142.egfToXYX-lkp@intel.com/
smatch warnings:
fs/netfs/write_collect.c:110 netfs_writeback_lookup_folio() error: we previously assumed 'folio' could be null (see line 99)
vim +/folio +110 fs/netfs/write_collect.c
9a3702e1d161f5 David Howells 2024-03-18 81
9a3702e1d161f5 David Howells 2024-03-18 82 /*
9a3702e1d161f5 David Howells 2024-03-18 83 * Get hold of a folio we have under writeback. We don't want to get the
9a3702e1d161f5 David Howells 2024-03-18 84 * refcount on it.
9a3702e1d161f5 David Howells 2024-03-18 85 */
9a3702e1d161f5 David Howells 2024-03-18 86 static struct folio *netfs_writeback_lookup_folio(struct netfs_io_request *wreq, loff_t pos)
9a3702e1d161f5 David Howells 2024-03-18 87 {
9a3702e1d161f5 David Howells 2024-03-18 88 XA_STATE(xas, &wreq->mapping->i_pages, pos / PAGE_SIZE);
9a3702e1d161f5 David Howells 2024-03-18 89 struct folio *folio;
9a3702e1d161f5 David Howells 2024-03-18 90
9a3702e1d161f5 David Howells 2024-03-18 91 rcu_read_lock();
9a3702e1d161f5 David Howells 2024-03-18 92
9a3702e1d161f5 David Howells 2024-03-18 93 for (;;) {
9a3702e1d161f5 David Howells 2024-03-18 94 xas_reset(&xas);
9a3702e1d161f5 David Howells 2024-03-18 95 folio = xas_load(&xas);
9a3702e1d161f5 David Howells 2024-03-18 96 if (xas_retry(&xas, folio))
9a3702e1d161f5 David Howells 2024-03-18 97 continue;
9a3702e1d161f5 David Howells 2024-03-18 98
9a3702e1d161f5 David Howells 2024-03-18 @99 if (!folio || xa_is_value(folio))
9a3702e1d161f5 David Howells 2024-03-18 100 kdebug("R=%08x: folio %lx (%llx) not present",
9a3702e1d161f5 David Howells 2024-03-18 101 wreq->debug_id, xas.xa_index, pos / PAGE_SIZE);
9a3702e1d161f5 David Howells 2024-03-18 102 BUG_ON(!folio || xa_is_value(folio));
9a3702e1d161f5 David Howells 2024-03-18 103
9a3702e1d161f5 David Howells 2024-03-18 104 if (folio == xas_reload(&xas))
9a3702e1d161f5 David Howells 2024-03-18 105 break;
9a3702e1d161f5 David Howells 2024-03-18 106 }
9a3702e1d161f5 David Howells 2024-03-18 107
9a3702e1d161f5 David Howells 2024-03-18 108 rcu_read_unlock();
9a3702e1d161f5 David Howells 2024-03-18 109
9a3702e1d161f5 David Howells 2024-03-18 @110 if (WARN_ONCE(!folio_test_writeback(folio),
9a3702e1d161f5 David Howells 2024-03-18 111 "R=%08x: folio %lx is not under writeback\n",
9a3702e1d161f5 David Howells 2024-03-18 112 wreq->debug_id, folio->index)) {
9a3702e1d161f5 David Howells 2024-03-18 113 trace_netfs_folio(folio, netfs_folio_trace_not_under_wback);
9a3702e1d161f5 David Howells 2024-03-18 114 }
9a3702e1d161f5 David Howells 2024-03-18 115 return folio;
9a3702e1d161f5 David Howells 2024-03-18 116 }
9a3702e1d161f5 David Howells 2024-03-18 117
:::::: The code at line 110 was first introduced by commit
:::::: 9a3702e1d161f5b03a7b42122f9f693af1144fc8 netfs: New writeback implementation
:::::: TO: David Howells <dhowells@redhat.com>
:::::: CC: David Howells <dhowells@redhat.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:[~2024-03-23 13:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-23 13:55 [dhowells-fs:netfs-writeback 17/22] fs/netfs/write_collect.c:110 netfs_writeback_lookup_folio() error: we previously assumed 'folio' could be null (see line 99) kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.