All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Chao Yu <yuchao0@huawei.com>, Chao Yu <chao@kernel.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	Chao Yu <yuchao0@huawei.com>, Chao Yu <chao@kernel.org>
Subject: [chao:bugfix/syzbot 30/42] fs/f2fs/node.c:1357:1: warning: unused label 'out_dec'
Date: Tue, 7 May 2024 03:52:09 +0800	[thread overview]
Message-ID: <202405070348.vi2230RC-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git bugfix/syzbot
head:   6fd891b7248d0b825dbff6454be21f60c7ba1fb0
commit: 144ab4eadffa6ed7dfa906c24e27134c78a0b01c [30/42] f2fs: fix to release node block count in error path of f2fs_new_node_page()
config: x86_64-buildonly-randconfig-005-20240507 (https://download.01.org/0day-ci/archive/20240507/202405070348.vi2230RC-lkp@intel.com/config)
compiler: clang version 18.1.4 (https://github.com/llvm/llvm-project e6c3289804a67ea0bb6a86fadbe454dd93b8d855)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240507/202405070348.vi2230RC-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/202405070348.vi2230RC-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> fs/f2fs/node.c:1357:1: warning: unused label 'out_dec' [-Wunused-label]
    1357 | out_dec:
         | ^~~~~~~~
   1 warning generated.


vim +/out_dec +1357 fs/f2fs/node.c

  1306	
  1307	struct page *f2fs_new_node_page(struct dnode_of_data *dn, unsigned int ofs)
  1308	{
  1309		struct f2fs_sb_info *sbi = F2FS_I_SB(dn->inode);
  1310		struct node_info new_ni;
  1311		struct page *page;
  1312		int err;
  1313	
  1314		if (unlikely(is_inode_flag_set(dn->inode, FI_NO_ALLOC)))
  1315			return ERR_PTR(-EPERM);
  1316	
  1317		page = f2fs_grab_cache_page(NODE_MAPPING(sbi), dn->nid, false);
  1318		if (!page)
  1319			return ERR_PTR(-ENOMEM);
  1320	
  1321		if (unlikely((err = inc_valid_node_count(sbi, dn->inode, !ofs))))
  1322			goto fail;
  1323	
  1324	#ifdef CONFIG_F2FS_CHECK_FS
  1325		err = f2fs_get_node_info(sbi, dn->nid, &new_ni, false);
  1326		if (err)
  1327			goto out_dec;
  1328	
  1329		if (unlikely(new_ni.blk_addr != NULL_ADDR)) {
  1330			err = -EFSCORRUPTED;
  1331			set_sbi_flag(sbi, SBI_NEED_FSCK);
  1332			f2fs_handle_error(sbi, ERROR_INVALID_BLKADDR);
  1333			goto out_dec;
  1334		}
  1335	#endif
  1336		new_ni.nid = dn->nid;
  1337		new_ni.ino = dn->inode->i_ino;
  1338		new_ni.blk_addr = NULL_ADDR;
  1339		new_ni.flag = 0;
  1340		new_ni.version = 0;
  1341		set_node_addr(sbi, &new_ni, NEW_ADDR, false);
  1342	
  1343		f2fs_wait_on_page_writeback(page, NODE, true, true);
  1344		fill_node_footer(page, dn->nid, dn->inode->i_ino, ofs, true);
  1345		set_cold_node(page, S_ISDIR(dn->inode->i_mode));
  1346		if (!PageUptodate(page))
  1347			SetPageUptodate(page);
  1348		if (set_page_dirty(page))
  1349			dn->node_changed = true;
  1350	
  1351		if (f2fs_has_xattr_block(ofs))
  1352			f2fs_i_xnid_write(dn->inode, dn->nid);
  1353	
  1354		if (ofs == 0)
  1355			inc_valid_inode_count(sbi);
  1356		return page;
> 1357	out_dec:
  1358		dec_valid_node_count(sbi, dn->inode, !ofs);
  1359	fail:
  1360		clear_node_page_dirty(page);
  1361		f2fs_put_page(page, 1);
  1362		return ERR_PTR(err);
  1363	}
  1364	

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

                 reply	other threads:[~2024-05-06 19:52 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=202405070348.vi2230RC-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=chao@kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=yuchao0@huawei.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.