All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Yunsheng Lin <yunshenglin0825@gmail.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [linyunsheng:page_bulk_alloc_opt 1/1] fs/xfs/xfs_buf.c:382:57: error: use of undeclared identifier 'refill'
Date: Mon, 17 Feb 2025 00:35:58 +0800	[thread overview]
Message-ID: <202502170011.yexpDjyi-lkp@intel.com> (raw)

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

                 reply	other threads:[~2025-02-16 16:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202502170011.yexpDjyi-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=yunshenglin0825@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.