* [linyunsheng:page_bulk_alloc_opt 1/1] fs/xfs/xfs_buf.c:382:57: error: use of undeclared identifier 'refill'
@ 2025-02-16 16:35 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-02-16 16:35 UTC (permalink / raw)
To: Yunsheng Lin; +Cc: llvm, oe-kbuild-all
tree: https://github.com/gestionlin/linux.git page_bulk_alloc_opt
head: a4f123e5e9347f8f9302bcc6b0a05c8a5a9ff4b8
commit: a4f123e5e9347f8f9302bcc6b0a05c8a5a9ff4b8 [1/1] mm: alloc_pages_bulk: remove assumption of populating only NULL elements
config: s390-randconfig-001-20250216 (https://download.01.org/0day-ci/archive/20250217/202502170011.yexpDjyi-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250217/202502170011.yexpDjyi-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/202502170011.yexpDjyi-lkp@intel.com/
All errors (new ones prefixed by >>):
>> fs/xfs/xfs_buf.c:382:57: error: use of undeclared identifier 'refill'
382 | alloc = alloc_pages_bulk(gfp_mask, bp->b_page_count - refill,
| ^
fs/xfs/xfs_buf.c:383:21: error: use of undeclared identifier 'refill'
383 | bp->b_pages + refill);
| ^
>> fs/xfs/xfs_buf.c:382:57: error: use of undeclared identifier 'refill'
382 | alloc = alloc_pages_bulk(gfp_mask, bp->b_page_count - refill,
| ^
fs/xfs/xfs_buf.c:383:21: error: use of undeclared identifier 'refill'
383 | bp->b_pages + refill);
| ^
>> fs/xfs/xfs_buf.c:382:57: error: use of undeclared identifier 'refill'
382 | alloc = alloc_pages_bulk(gfp_mask, bp->b_page_count - refill,
| ^
fs/xfs/xfs_buf.c:383:21: error: use of undeclared identifier 'refill'
383 | bp->b_pages + refill);
| ^
fs/xfs/xfs_buf.c:384:3: error: use of undeclared identifier 'refill'
384 | refill += alloc;
| ^
7 errors generated.
vim +/refill +382 fs/xfs/xfs_buf.c
346
347 static int
348 xfs_buf_alloc_pages(
349 struct xfs_buf *bp,
350 xfs_buf_flags_t flags)
351 {
352 gfp_t gfp_mask = GFP_KERNEL | __GFP_NOLOCKDEP | __GFP_NOWARN;
353 long filled = 0;
354
355 if (flags & XBF_READ_AHEAD)
356 gfp_mask |= __GFP_NORETRY;
357
358 /* Make sure that we have a page list */
359 bp->b_page_count = DIV_ROUND_UP(BBTOB(bp->b_length), PAGE_SIZE);
360 if (bp->b_page_count <= XB_PAGES) {
361 bp->b_pages = bp->b_page_array;
362 } else {
363 bp->b_pages = kzalloc(sizeof(struct page *) * bp->b_page_count,
364 gfp_mask);
365 if (!bp->b_pages)
366 return -ENOMEM;
367 }
368 bp->b_flags |= _XBF_PAGES;
369
370 /* Assure zeroed buffer for non-read cases. */
371 if (!(flags & XBF_READ))
372 gfp_mask |= __GFP_ZERO;
373
374 /*
375 * Bulk filling of pages can take multiple calls. Not filling the entire
376 * array is not an allocation failure, so don't back off if we get at
377 * least one extra page.
378 */
379 for (;;) {
380 long alloc;
381
> 382 alloc = alloc_pages_bulk(gfp_mask, bp->b_page_count - refill,
383 bp->b_pages + refill);
384 refill += alloc;
385 if (filled == bp->b_page_count) {
386 XFS_STATS_INC(bp->b_mount, xb_page_found);
387 break;
388 }
389
390 if (alloc)
391 continue;
392
393 if (flags & XBF_READ_AHEAD) {
394 xfs_buf_free_pages(bp);
395 return -ENOMEM;
396 }
397
398 XFS_STATS_INC(bp->b_mount, xb_page_retries);
399 memalloc_retry_wait(gfp_mask);
400 }
401 return 0;
402 }
403
--
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:[~2025-02-16 16:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-16 16:35 [linyunsheng:page_bulk_alloc_opt 1/1] fs/xfs/xfs_buf.c:382:57: error: use of undeclared identifier 'refill' 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.