Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Luis Chamberlain <mcgrof@kernel.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [mcgrof:20250423-v6.15-rc3-ext4-fix 2/2] mm/migrate.c:963:22: error: use of undeclared identifier 'bh_migrate_folio_norefs_nohead_invalid'; did you mean 'bh_migrate_folio_norefs_nohead_fails'?
Date: Thu, 24 Apr 2025 13:58:10 +0800	[thread overview]
Message-ID: <202504241311.7F6k4FJY-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git 20250423-v6.15-rc3-ext4-fix
head:   58ad1a2b2d0abfd272e05e695cd4c635f49e934e
commit: 58ad1a2b2d0abfd272e05e695cd4c635f49e934e [2/2] mm: add migration buffer-head debugfs interface
config: s390-allmodconfig (https://download.01.org/0day-ci/archive/20250424/202504241311.7F6k4FJY-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250424/202504241311.7F6k4FJY-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/202504241311.7F6k4FJY-lkp@intel.com/

All errors (new ones prefixed by >>):

>> mm/migrate.c:963:22: error: use of undeclared identifier 'bh_migrate_folio_norefs_nohead_invalid'; did you mean 'bh_migrate_folio_norefs_nohead_fails'?
     963 |                                 atomic_long_inc(&bh_migrate_folio_norefs_nohead_invalid);
         |                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         |                                                  bh_migrate_folio_norefs_nohead_fails
   mm/migrate.c:818:1: note: 'bh_migrate_folio_norefs_nohead_fails' declared here
     818 | BH_STATS(DECLARE_STAT)
         | ^
   mm/migrate.c:809:4: note: expanded from macro 'BH_STATS'
     809 |         X(bh_migrate_folio_norefs_nohead_fails, 1, "no-head-fails")            \
         |           ^
   1 error generated.


vim +963 mm/migrate.c

   947	
   948	static int __buffer_migrate_folio(struct address_space *mapping,
   949			struct folio *dst, struct folio *src, enum migrate_mode mode,
   950			bool check_refs)
   951	{
   952		struct buffer_head *bh, *head;
   953		int rc;
   954		int expected_count;
   955	
   956		head = folio_buffers(src);
   957		if (!head) {
   958			rc = migrate_folio(mapping, dst, src, mode);
   959			if (check_refs) {
   960				if (rc == 0)
   961					atomic_long_inc(&bh_migrate_folio_norefs_nohead_success);
   962				else
 > 963					atomic_long_inc(&bh_migrate_folio_norefs_nohead_invalid);
   964			}
   965			return rc;
   966		}
   967	
   968		/* Check whether page does not have extra refs before we do more work */
   969		expected_count = folio_expected_refs(mapping, src);
   970		if (folio_ref_count(src) != expected_count)
   971			return -EAGAIN;
   972	
   973		if (!buffer_migrate_lock_buffers(head, mode))
   974			return -EAGAIN;
   975	
   976		if (check_refs) {
   977			bool busy, migrating;
   978			bool invalidated = false;
   979	
   980			migrating = test_and_set_bit_lock(BH_Migrate, &head->b_state);
   981			VM_WARN_ON_ONCE(migrating);
   982	recheck_buffers:
   983			busy = false;
   984			spin_lock(&mapping->i_private_lock);
   985			bh = head;
   986			do {
   987				if (atomic_read(&bh->b_count)) {
   988					busy = true;
   989					break;
   990				}
   991				bh = bh->b_this_page;
   992			} while (bh != head);
   993			spin_unlock(&mapping->i_private_lock);
   994			if (busy) {
   995				if (invalidated) {
   996					rc = -EAGAIN;
   997					atomic_long_inc(&bh_migrate_folio_norefs_busy);
   998					goto unlock_buffers;
   999				}
  1000				invalidate_bh_lrus();
  1001				invalidated = true;
  1002				goto recheck_buffers;
  1003			}
  1004			atomic_long_inc(&bh_migrate_folio_norefs_valid);
  1005		}
  1006	
  1007		rc = filemap_migrate_folio(mapping, dst, src, mode);
  1008		if (rc != MIGRATEPAGE_SUCCESS) {
  1009			if (check_refs)
  1010				atomic_long_inc(&bh_migrate_folio_norefs_valid_fails);
  1011			goto unlock_buffers;
  1012		} else if (check_refs)
  1013			atomic_long_inc(&bh_migrate_folio_norefs_valid_success);
  1014	
  1015		bh = head;
  1016		do {
  1017			folio_set_bh(bh, dst, bh_offset(bh));
  1018			bh = bh->b_this_page;
  1019		} while (bh != head);
  1020	
  1021	unlock_buffers:
  1022		if (check_refs)
  1023			clear_bit_unlock(BH_Migrate, &head->b_state);
  1024		bh = head;
  1025		do {
  1026			unlock_buffer(bh);
  1027			bh = bh->b_this_page;
  1028		} while (bh != head);
  1029	
  1030		return rc;
  1031	}
  1032	

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

                 reply	other threads:[~2025-04-24  5:58 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=202504241311.7F6k4FJY-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=mcgrof@kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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