Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Gautham Ananthakrishna <gautham.ananthakrishna@oracle.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	LUCI Bot <vijayendra.suman@oracle.com>,
	Stephen Brennan <stephen.s.brennan@oracle.com>
Subject: [jlayton:uek-localio 2035/2262] fs/dcache.c:1524:15: error: call to undeclared function 'get_nr_dentry_negative'; ISO C99 and later do not support implicit function declarations
Date: Sat, 24 May 2025 15:28:26 +0800	[thread overview]
Message-ID: <202505241556.znrmDJD9-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git uek-localio
head:   65b0dc6bb1f5c18e63d8ee9ea1cca997456a81a9
commit: e1acd9346cb93ba4b4d1547147c6815e229bdbdb [2035/2262] fs/dcache: schedule only one instance of negative dentry shrinker
config: hexagon-randconfig-002-20250524 (https://download.01.org/0day-ci/archive/20250524/202505241556.znrmDJD9-lkp@intel.com/config)
compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project f819f46284f2a79790038e1f6649172789734ae8)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250524/202505241556.znrmDJD9-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/202505241556.znrmDJD9-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from fs/dcache.c:31:
   In file included from include/linux/security.h:35:
   In file included from include/linux/bpf.h:31:
   In file included from include/linux/memcontrol.h:23:
   In file included from include/linux/writeback.h:13:
   In file included from include/linux/blk_types.h:10:
   In file included from include/linux/bvec.h:10:
   include/linux/highmem.h:265:2: error: call to undeclared function 'clear_user_page_uncached'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     265 |         clear_user_page_uncached(addr, vaddr, page);
         |         ^
   include/linux/highmem.h:265:2: note: did you mean 'clear_user_highpage_uncached'?
   include/linux/highmem.h:261:20: note: 'clear_user_highpage_uncached' declared here
     261 | static inline void clear_user_highpage_uncached(struct page *page, unsigned long vaddr)
         |                    ^
     262 | {
     263 |         void *addr = kmap_atomic(page);
     264 | 
     265 |         clear_user_page_uncached(addr, vaddr, page);
         |         ~~~~~~~~~~~~~~~~~~~~~~~~
         |         clear_user_highpage_uncached
>> fs/dcache.c:1524:15: error: call to undeclared function 'get_nr_dentry_negative'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    1524 |         long count = get_nr_dentry_negative();
         |                      ^
   fs/dcache.c:1584:10: error: call to undeclared function 'get_nr_dentry_negative'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    1584 |         count = get_nr_dentry_negative();
         |                 ^
   fs/dcache.c:1577:7: warning: variable 'last_n_neg' set but not used [-Wunused-but-set-variable]
    1577 |         long last_n_neg, excess, count;
         |              ^
   fs/dcache.c:1578:16: warning: variable 'start' set but not used [-Wunused-but-set-variable]
    1578 |         unsigned long start;
         |                       ^
   2 warnings and 3 errors generated.


vim +/get_nr_dentry_negative +1524 fs/dcache.c

  1516	
  1517	/*
  1518	 * Prune dentries from a super block.
  1519	 */
  1520	static void prune_negative_one_sb(struct super_block *sb, void *arg)
  1521	{
  1522		unsigned long freed, scan;
  1523		long limit;
> 1524		long count = get_nr_dentry_negative();
  1525		struct prune_negative_ctrl *ctrl = arg;
  1526		LIST_HEAD(dispose);
  1527	
  1528		/*
  1529		 * Try to spread the scan over 5 iterations if the number is
  1530		 * reasonable. If the overshoot is less than 25%, spread the
  1531		 * spread the pruning across 5 iterations, not to impact
  1532		 * the performance. Otherwise, prune aggrressively.
  1533		 * Add an extra 1% as a minimum and to increase the chance
  1534		 * that the after operation dentry count stays below the limit.
  1535		 */
  1536		limit = neg_dentry_nfree_init + ctrl->prune_ncpus * (neg_dentry_percpu_limit -
  1537					(neg_dentry_percpu_limit / 100));
  1538	
  1539		if (limit >= count || limit < 4) /* Haven't crossed the limit yet */
  1540			return;
  1541	
  1542		if ((count-limit) < (limit / 4))
  1543			scan = (count - limit) / (ctrl->prune_nsupers * 5);
  1544		else
  1545			scan = (count - limit) / ctrl->prune_nsupers;
  1546	
  1547		if (ctrl->prune_percent) {
  1548			freed = list_lru_walk(&sb->s_dentry_lru, dentry_negative_lru_isolate,
  1549				&dispose, scan);
  1550	
  1551			if (freed) {
  1552				shrink_dentry_list(&dispose);
  1553				ctrl->prune_count += freed;
  1554			}
  1555		}
  1556	}
  1557	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2025-05-24  7:28 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=202505241556.znrmDJD9-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=gautham.ananthakrishna@oracle.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=stephen.s.brennan@oracle.com \
    --cc=vijayendra.suman@oracle.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox