[dhowells-fs:netfs-next 33/36] fs/netfs/write_collect.c:204:4: error: call to undeclared function 'mempool_free'; ISO C99 and later do not support implicit function declarations

kernel test robot <[email protected]>
Newsgroups dev.linux.lists.oe-kbuild-all
Message-ID <[email protected]>
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git netfs-next
head:   8f0e78ba82ccca8613b01c5f0215f8ce7c7c5cf3
commit: e09967cf018fd9ee7f1324d6ccea2d0a5f6b0f46 [33/36] netfs: Rework writeback to use a separate list of regions to be unlocked
config: i386-randconfig-141-20260826 (https://download.01.org/0day-ci/archive/20260826/[email protected]/config)
compiler: clang version 22.1.3 (https://github.com/llvm/llvm-project e9846648fd6183ee6d8cbdb4502213fcf902a211)
smatch: v0.5.0-9187-g5189e3fb
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260826/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

>> fs/netfs/write_collect.c:204:4: error: call to undeclared function 'mempool_free'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     204 |                         mempool_free(wback, &netfs_bvecq_pool);
         |                         ^
   1 error generated.
--
>> fs/netfs/write_issue.c:795:11: error: call to undeclared function 'mempool_alloc'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     795 |                 wback = mempool_alloc(&netfs_writeback_pool, wreq->gfp);
         |                         ^
>> fs/netfs/write_issue.c:795:9: error: incompatible integer to pointer conversion assigning to 'struct netfs_writeback *' from 'int' [-Wint-conversion]
     795 |                 wback = mempool_alloc(&netfs_writeback_pool, wreq->gfp);
         |                       ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   2 errors generated.


vim +/mempool_free +204 fs/netfs/write_collect.c

   163	
   164	/*
   165	 * Unlock any folios we've finished with.
   166	 */
   167	static void netfs_writeback_unlock_folios(struct netfs_io_request *wreq,
   168						  unsigned int *notes)
   169	{
   170		struct netfs_writeback *wback, *next;
   171	
   172		if (wreq->origin == NETFS_PGPRIV2_COPY_TO_CACHE) {
   173			if (netfs_pgpriv2_unlock_copied_folios(wreq))
   174				*notes |= MADE_PROGRESS;
   175			return;
   176		}
   177	
   178		wback = wreq->writebacks;
   179	
   180		for (;;) {
   181			uoff_t stop_at;
   182			size_t len;
   183	
   184			/* Jump over discontiguities. */
   185			if (wreq->cleaned_to < wback->start)
   186				wreq->cleaned_to = wback->start;
   187	
   188			if (wreq->collected_to <= wreq->cleaned_to)
   189				break;
   190	
   191			/* Order read of region length before reading folios. */
   192			len = smp_load_acquire(&wback->len);
   193	
   194			if (wreq->cleaned_to >= wback->start + len) {
   195				/* Order read of next before recheck length. */
   196				next = smp_load_acquire(&wback->next);
   197				if (!next)
   198					break; /* We don't remove the tail writeback. */
   199	
   200				/* Order read of region length before reading folios. */
   201				if (len != smp_load_acquire(&wback->len))
   202					continue; /* len/next update race. */
   203	
 > 204				mempool_free(wback, &netfs_bvecq_pool);
   205				wreq->writebacks = next;
   206				wback = next;
   207				continue;
   208			}
   209	
   210			stop_at = min(wreq->collected_to, wback->start + len);
   211	
   212			trace_netfs_collect_folios(wreq, wback->start, len);
   213			if (!folio_end_writeback_range(wreq->mapping, &wreq->cleaned_to, stop_at,
   214						       netfs_folio_written_back, wreq))
   215				break;
   216			*notes |= MADE_PROGRESS;
   217		}
   218	}
   219	

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.