* [dhowells-fs:netfs-crypt 30/37] fs/netfs/misc.c:19:2: error: call to undeclared function 'mempool_free'; ISO C99 and later do not support implicit function declarations
@ 2024-09-03 13:42 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-09-03 13:42 UTC (permalink / raw)
To: David Howells; +Cc: llvm, oe-kbuild-all
tree: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git netfs-crypt
head: 3962f4beba4e7ffa6cfab018df8a612902a1d2c8
commit: d1be8ca79490c7d6d61fa36a6f05537ecc1f2edb [30/37] netfs: Add bounce buffering support
config: i386-buildonly-randconfig-003-20240903 (https://download.01.org/0day-ci/archive/20240903/202409032102.xgZmaBlx-lkp@intel.com/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240903/202409032102.xgZmaBlx-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/202409032102.xgZmaBlx-lkp@intel.com/
All errors (new ones prefixed by >>):
>> fs/netfs/misc.c:19:2: error: call to undeclared function 'mempool_free'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
19 | mempool_free(folio, &netfs_folio_pool);
| ^
>> fs/netfs/misc.c:61:11: error: call to undeclared function 'mempool_alloc'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
61 | folio = mempool_alloc(&netfs_folio_pool, gfp);
| ^
>> fs/netfs/misc.c:61:9: error: incompatible integer to pointer conversion assigning to 'struct folio *' from 'int' [-Wint-conversion]
61 | folio = mempool_alloc(&netfs_folio_pool, gfp);
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3 errors generated.
vim +/mempool_free +19 fs/netfs/misc.c
11
12 /*
13 * Discard our reference on the folio, returning it to the memory pool if we
14 * hold the last ref on it. The filesystem may have used MSG_SPLICE_PAGES on
15 * it and so it may have extra refs still.
16 */
17 void netfs_mempool_folio_put(struct folio *folio)
18 {
> 19 mempool_free(folio, &netfs_folio_pool);
20 }
21
22 /*
23 * Reset the subrequest iterator to refer just to the region remaining to be
24 * read. The iterator may or may not have been advanced by socket ops or
25 * extraction ops to an extent that may or may not match the amount actually
26 * read.
27 */
28 void netfs_reset_iter(struct netfs_io_subrequest *subreq)
29 {
30 struct iov_iter *io_iter = &subreq->io_iter;
31 size_t remain = subreq->len - subreq->transferred;
32
33 if (io_iter->count > remain)
34 iov_iter_advance(io_iter, io_iter->count - remain);
35 else if (io_iter->count < remain)
36 iov_iter_revert(io_iter, remain - io_iter->count);
37 iov_iter_truncate(&subreq->io_iter, remain);
38 }
39
40
41 /*
42 * Create the specified folio in the specified buffer attached to the request.
43 * The folios are marked with NETFS_BUF_PUT_MARK so that we know that these
44 * need freeing later.
45 *
46 * We set the index on the folio so that we can keep track of gaps in the
47 * buffer for when we're cleaning it up.
48 */
49 struct folio *netfs_add_folio_to_buffer(struct rolling_buffer *roll,
50 pgoff_t index, gfp_t gfp)
51 {
52 struct folio *folio;
53
54 for (;;) {
55 if (rolling_buffer_make_space(roll) == 0)
56 break;
57 msleep(10);
58 }
59
60 for (;;) {
> 61 folio = mempool_alloc(&netfs_folio_pool, gfp);
62 if (folio)
63 break;
64 msleep(10);
65 }
66
67 folio->index = index;
68 rolling_buffer_append(roll, folio, NETFS_FLAG_PUT_MARK);
69 return folio;
70 }
71
--
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-09-03 13:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-03 13:42 [dhowells-fs:netfs-crypt 30/37] fs/netfs/misc.c:19:2: error: call to undeclared function 'mempool_free'; ISO C99 and later do not support implicit function declarations 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