All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Luis Chamberlain <mcgrof@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [mcgrof:20250423-v6.15-rc3-ext4-fix 2/2] mm/migrate.c:963:50: error: 'bh_migrate_folio_norefs_nohead_invalid' undeclared; did you mean 'bh_migrate_folio_norefs_nohead_fails'?
Date: Thu, 24 Apr 2025 12:36:01 +0800	[thread overview]
Message-ID: <202504241233.UP3c1pmN-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: x86_64-defconfig (https://download.01.org/0day-ci/archive/20250424/202504241233.UP3c1pmN-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-12) 11.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250424/202504241233.UP3c1pmN-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/202504241233.UP3c1pmN-lkp@intel.com/

All errors (new ones prefixed by >>):

   mm/migrate.c: In function '__buffer_migrate_folio':
>> mm/migrate.c:963:50: error: 'bh_migrate_folio_norefs_nohead_invalid' undeclared (first use in this function); 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:963:50: note: each undeclared identifier is reported only once for each function it appears in
   mm/migrate.c: At top level:
   cc1: note: unrecognized command-line option '-Wno-unterminated-string-initialization' may have been intended to silence earlier diagnostics


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  4: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=202504241233.UP3c1pmN-lkp@intel.com \
    --to=lkp@intel.com \
    --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 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.