tree:
https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git
fscache-iter
head: f6ac6a6db767d26c3330f0cecadd4f331ee6d291
commit: 02956137643245200e02a2683c203fed2308aece [40/55] fscache: Add read helper
config: x86_64-randconfig-a013-20200909 (attached as .config)
compiler: clang version 12.0.0 (
https://github.com/llvm/llvm-project
0a5dc7effb191eff740e0e7ae7bd8e1f6bdb3ad9)
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
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git checkout 02956137643245200e02a2683c203fed2308aece
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
> fs/fscache/read_helper.c:202:6: warning: no previous prototype
for function 'fscache_rreq_write_to_cache' [-Wmissing-prototypes]
void
fscache_rreq_write_to_cache(struct fscache_read_request *rreq)
^
fs/fscache/read_helper.c:202:1: note: declare 'static' if the function is not
intended to be used outside of this translation unit
void fscache_rreq_write_to_cache(struct fscache_read_request *rreq)
^
static
1 warning generated.
#
https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/com...
git remote add dhowells-fs
https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git
git fetch --no-tags dhowells-fs fscache-iter
git checkout 02956137643245200e02a2683c203fed2308aece
vim +/fscache_rreq_write_to_cache +202 fs/fscache/read_helper.c
197
198 /*
199 * Perform any outstanding writes to the cache. We inherit a ref from the
200 * caller.
201 */
202 void fscache_rreq_write_to_cache(struct fscache_read_request
*rreq)
203 {
204 struct fscache_io_request *ioreq, *next, *p;
205 struct iov_iter iter;
206
207 fscache_wait_for_object(rreq->cookie, rreq->object, FSCACHE_WANT_WRITE);
208
209 /* We don't want terminating writes trying to wake us up whilst we're
210 * still going through the list.
211 */
212 atomic_inc(&rreq->nr_io_ops);
213
214 list_for_each_entry_safe(ioreq, p, &rreq->io_requests, rreq_link) {
215 if (!test_bit(FSCACHE_IO_WRITE_TO_CACHE, &ioreq->flags)) {
216 list_del_init(&ioreq->rreq_link);
217 fscache_put_io_request(ioreq);
218 }
219 }
220
221 list_for_each_entry(ioreq, &rreq->io_requests, rreq_link) {
222 /* Amalgamate adjacent writes */
223 while (!list_is_last(&ioreq->rreq_link, &rreq->io_requests)) {
224 next = list_next_entry(ioreq, rreq_link);
225 if (next->start > ioreq->start + ioreq->len)
226 break;
227 ioreq->len += next->len;
228 list_del_init(&next->rreq_link);
229 fscache_put_io_request(next);
230 }
231
232 iov_iter_xarray(&iter, WRITE, &rreq->mapping->i_pages,
233 ioreq->start, ioreq->len);
234
235 ioreq->io_done = fscache_rreq_copy_done;
236 fscache_get_io_request(ioreq);
237 rreq->object->cache->ops->write(rreq->object, ioreq, &iter);
238 }
239
240 /* If we decrement nr_io_ops to 0, the usage ref belongs to us. */
241 if (atomic_dec_and_test(&rreq->nr_io_ops))
242 fscache_rreq_unmark_after_write(rreq);
243 }
244
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org