All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Jaegeuk Kim <jaegeuk@kernel.org>
Cc: linux-f2fs-devel@lists.sourceforge.net, oe-kbuild-all@lists.linux.dev
Subject: [f2fs-dev] [jaegeuk-f2fs:dev-test 30/30] fs/f2fs/inode.c:1065:13: error: implicit declaration of function 'current_is_kswapd'
Date: Wed, 12 Aug 2026 02:53:47 +0800	[thread overview]
Message-ID: <202608120225.emwHea9z-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git dev-test
head:   7451b3cd93b30f714efc83f6571abf8c50541839
commit: 7451b3cd93b30f714efc83f6571abf8c50541839 [30/30] f2fs: call __add_ino_entry out of the eviction path
config: powerpc-allmodconfig (https://download.01.org/0day-ci/archive/20260812/202608120225.emwHea9z-lkp@intel.com/config)
compiler: powerpc64-linux-gcc (GCC) 16.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260812/202608120225.emwHea9z-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/202608120225.emwHea9z-lkp@intel.com/

All errors (new ones prefixed by >>):

   fs/f2fs/inode.c: In function 'f2fs_post_evict_inode':
>> fs/f2fs/inode.c:1065:13: error: implicit declaration of function 'current_is_kswapd' [-Wimplicit-function-declaration]
    1065 |         if (current_is_kswapd()) {
         |             ^~~~~~~~~~~~~~~~~


vim +/current_is_kswapd +1065 fs/f2fs/inode.c

  1019	
  1020	static void f2fs_post_evict_inode(struct inode *inode)
  1021	{
  1022		struct f2fs_sb_info *sbi = F2FS_I_SB(inode);
  1023		struct f2fs_inode_info *fi = F2FS_I(inode);
  1024		nid_t xnid = fi->i_xattr_nid;
  1025		unsigned int record_bits = 0;
  1026	
  1027		dquot_drop(inode);
  1028	
  1029		stat_dec_inline_xattr(inode);
  1030		stat_dec_inline_dir(inode);
  1031		stat_dec_inline_inode(inode);
  1032		stat_dec_compr_inode(inode);
  1033		stat_sub_compr_blocks(inode,
  1034				atomic_read(&fi->i_compr_blocks));
  1035	
  1036		if (likely(!f2fs_cp_error(sbi) &&
  1037					!is_sbi_flag_set(sbi, SBI_CP_DISABLED)))
  1038			f2fs_bug_on(sbi, is_inode_flag_set(inode, FI_DIRTY_INODE));
  1039	
  1040		/*
  1041		 * anyway, it needs to remove the inode from sbi->inode_list[DIRTY_META]
  1042		 * list to avoid UAF in f2fs_sync_inode_meta() during checkpoint.
  1043		 */
  1044		f2fs_inode_synced(inode);
  1045	
  1046		/* for the case f2fs_new_inode() was failed, .i_ino is zero, skip it */
  1047		if (inode->i_ino)
  1048			invalidate_mapping_pages(NODE_MAPPING(sbi), inode->i_ino,
  1049								inode->i_ino);
  1050		if (xnid)
  1051			invalidate_mapping_pages(NODE_MAPPING(sbi), xnid, xnid);
  1052	
  1053		if (!inode->i_nlink)
  1054			goto skip_record;
  1055	
  1056		if (is_inode_flag_set(inode, FI_APPEND_WRITE))
  1057			record_bits = BIT(APPEND_INO);
  1058		if (is_inode_flag_set(inode, FI_UPDATE_WRITE))
  1059			record_bits = BIT(UPDATE_INO);
  1060	
  1061		if (!record_bits)
  1062			goto skip_record;
  1063	
  1064		/* Let's do this in workqueue out of the direct reclaim path. */
> 1065		if (current_is_kswapd()) {
  1066			f2fs_record_inode_state(sbi, inode->i_ino, record_bits);
  1067		} else {
  1068			struct evict_inode_work *ew =
  1069				mempool_alloc(evict_inode_work_pool, GFP_NOFS);
  1070	
  1071			ew->sbi = sbi;
  1072			ew->ino = inode->i_ino;
  1073			ew->add_ino_entry_bits = record_bits;
  1074			INIT_WORK(&ew->work, f2fs_evict_inode_work);
  1075			queue_work(sbi->evict_wq, &ew->work);
  1076		}
  1077	skip_record:
  1078		if (is_inode_flag_set(inode, FI_FREE_NID)) {
  1079			f2fs_alloc_nid_failed(sbi, inode->i_ino);
  1080			clear_inode_flag(inode, FI_FREE_NID);
  1081		} else {
  1082			/*
  1083			 * If xattr nid is corrupted, we can reach out error condition,
  1084			 * err & !f2fs_exist_written_data(sbi, inode->i_ino, ORPHAN_INO)).
  1085			 * In that case, f2fs_check_nid_range() is enough to give a clue.
  1086			 */
  1087		}
  1088	}
  1089	

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


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Jaegeuk Kim <jaegeuk@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev,
	linux-f2fs-devel@lists.sourceforge.net, Chao Yu <chao@kernel.org>
Subject: [jaegeuk-f2fs:dev-test 30/30] fs/f2fs/inode.c:1065:13: error: implicit declaration of function 'current_is_kswapd'
Date: Wed, 12 Aug 2026 02:53:47 +0800	[thread overview]
Message-ID: <202608120225.emwHea9z-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git dev-test
head:   7451b3cd93b30f714efc83f6571abf8c50541839
commit: 7451b3cd93b30f714efc83f6571abf8c50541839 [30/30] f2fs: call __add_ino_entry out of the eviction path
config: powerpc-allmodconfig (https://download.01.org/0day-ci/archive/20260812/202608120225.emwHea9z-lkp@intel.com/config)
compiler: powerpc64-linux-gcc (GCC) 16.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260812/202608120225.emwHea9z-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/202608120225.emwHea9z-lkp@intel.com/

All errors (new ones prefixed by >>):

   fs/f2fs/inode.c: In function 'f2fs_post_evict_inode':
>> fs/f2fs/inode.c:1065:13: error: implicit declaration of function 'current_is_kswapd' [-Wimplicit-function-declaration]
    1065 |         if (current_is_kswapd()) {
         |             ^~~~~~~~~~~~~~~~~


vim +/current_is_kswapd +1065 fs/f2fs/inode.c

  1019	
  1020	static void f2fs_post_evict_inode(struct inode *inode)
  1021	{
  1022		struct f2fs_sb_info *sbi = F2FS_I_SB(inode);
  1023		struct f2fs_inode_info *fi = F2FS_I(inode);
  1024		nid_t xnid = fi->i_xattr_nid;
  1025		unsigned int record_bits = 0;
  1026	
  1027		dquot_drop(inode);
  1028	
  1029		stat_dec_inline_xattr(inode);
  1030		stat_dec_inline_dir(inode);
  1031		stat_dec_inline_inode(inode);
  1032		stat_dec_compr_inode(inode);
  1033		stat_sub_compr_blocks(inode,
  1034				atomic_read(&fi->i_compr_blocks));
  1035	
  1036		if (likely(!f2fs_cp_error(sbi) &&
  1037					!is_sbi_flag_set(sbi, SBI_CP_DISABLED)))
  1038			f2fs_bug_on(sbi, is_inode_flag_set(inode, FI_DIRTY_INODE));
  1039	
  1040		/*
  1041		 * anyway, it needs to remove the inode from sbi->inode_list[DIRTY_META]
  1042		 * list to avoid UAF in f2fs_sync_inode_meta() during checkpoint.
  1043		 */
  1044		f2fs_inode_synced(inode);
  1045	
  1046		/* for the case f2fs_new_inode() was failed, .i_ino is zero, skip it */
  1047		if (inode->i_ino)
  1048			invalidate_mapping_pages(NODE_MAPPING(sbi), inode->i_ino,
  1049								inode->i_ino);
  1050		if (xnid)
  1051			invalidate_mapping_pages(NODE_MAPPING(sbi), xnid, xnid);
  1052	
  1053		if (!inode->i_nlink)
  1054			goto skip_record;
  1055	
  1056		if (is_inode_flag_set(inode, FI_APPEND_WRITE))
  1057			record_bits = BIT(APPEND_INO);
  1058		if (is_inode_flag_set(inode, FI_UPDATE_WRITE))
  1059			record_bits = BIT(UPDATE_INO);
  1060	
  1061		if (!record_bits)
  1062			goto skip_record;
  1063	
  1064		/* Let's do this in workqueue out of the direct reclaim path. */
> 1065		if (current_is_kswapd()) {
  1066			f2fs_record_inode_state(sbi, inode->i_ino, record_bits);
  1067		} else {
  1068			struct evict_inode_work *ew =
  1069				mempool_alloc(evict_inode_work_pool, GFP_NOFS);
  1070	
  1071			ew->sbi = sbi;
  1072			ew->ino = inode->i_ino;
  1073			ew->add_ino_entry_bits = record_bits;
  1074			INIT_WORK(&ew->work, f2fs_evict_inode_work);
  1075			queue_work(sbi->evict_wq, &ew->work);
  1076		}
  1077	skip_record:
  1078		if (is_inode_flag_set(inode, FI_FREE_NID)) {
  1079			f2fs_alloc_nid_failed(sbi, inode->i_ino);
  1080			clear_inode_flag(inode, FI_FREE_NID);
  1081		} else {
  1082			/*
  1083			 * If xattr nid is corrupted, we can reach out error condition,
  1084			 * err & !f2fs_exist_written_data(sbi, inode->i_ino, ORPHAN_INO)).
  1085			 * In that case, f2fs_check_nid_range() is enough to give a clue.
  1086			 */
  1087		}
  1088	}
  1089	

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

             reply	other threads:[~2026-08-11 18:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-11 18:53 kernel test robot [this message]
2026-08-11 18:53 ` [jaegeuk-f2fs:dev-test 30/30] fs/f2fs/inode.c:1065:13: error: implicit declaration of function 'current_is_kswapd' kernel test robot

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=202608120225.emwHea9z-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --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.