[dhowells-fs:netfs-folio-regions 16/28] fs/netfs/objects.c:125:17: error: implicit declaration of function 'netfs_is_cache_enabled'

From: kernel test robot
Date: Thu Aug 19 2021 - 16:15:43 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git netfs-folio-regions
head: 215a4ee495a95cc73256ed76f91cb78bcabd6b8e
commit: f3e6e00066254822783e68e4c3bf9f8904f6ab6a [16/28] netfs: Send write request to multiple destinations
config: hexagon-randconfig-r041-20210818 (attached as .config)
compiler: clang version 12.0.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/commit/?id=f3e6e00066254822783e68e4c3bf9f8904f6ab6a
git remote add dhowells-fs https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git
git fetch --no-tags dhowells-fs netfs-folio-regions
git checkout f3e6e00066254822783e68e4c3bf9f8904f6ab6a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=hexagon

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

>> fs/netfs/objects.c:125:17: error: implicit declaration of function 'netfs_is_cache_enabled' [-Werror,-Wimplicit-function-declaration]
if (!is_dio && netfs_is_cache_enabled(ctx)) {
^
1 error generated.


vim +/netfs_is_cache_enabled +125 fs/netfs/objects.c

114
115 struct netfs_write_request *netfs_alloc_write_request(struct address_space *mapping,
116 bool is_dio)
117 {
118 static atomic_t debug_ids;
119 struct inode *inode = mapping->host;
120 struct netfs_i_context *ctx = netfs_i_context(inode);
121 struct netfs_write_request *wreq;
122 unsigned int n_streams = ctx->n_wstreams, i;
123 bool cached = false;
124
> 125 if (!is_dio && netfs_is_cache_enabled(ctx)) {
126 n_streams++;
127 cached = true;
128 }
129
130 wreq = kzalloc(struct_size(wreq, streams, n_streams), GFP_KERNEL);
131 if (wreq) {
132 wreq->mapping = mapping;
133 wreq->inode = inode;
134 wreq->netfs_ops = ctx->ops;
135 wreq->max_streams = n_streams;
136 wreq->debug_id = atomic_inc_return(&debug_ids);
137 if (cached)
138 __set_bit(NETFS_WREQ_WRITE_TO_CACHE, &wreq->flags);
139 xa_init(&wreq->buffer);
140 INIT_WORK(&wreq->work, netfs_writeback_worker);
141 for (i = 0; i < n_streams; i++)
142 INIT_LIST_HEAD(&wreq->streams[i].subrequests);
143 refcount_set(&wreq->usage, 1);
144 atomic_set(&wreq->outstanding, 1);
145 ctx->ops->init_wreq(wreq);
146 netfs_stat(&netfs_n_wh_wreq);
147 trace_netfs_ref_wreq(wreq->debug_id, 1, netfs_wreq_trace_new);
148 }
149
150 return wreq;
151 }
152

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip