[chao:feature/cache 8/13] fs/f2fs/data.c:61:23: warning: variable 'sbi' set but not used

kernel test robot <[email protected]>
Newsgroups dev.linux.lists.llvm,dev.linux.lists.oe-kbuild-all
Message-ID <[email protected]>
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git feature/cache
head:   cc6a23d8c232f588f3a5415d1b10a19e1e4ce860
commit: f93483387c4c8dd531a818f52e740c1049d00de1 [8/13] f2fs: cache: use node cache
config: x86_64-kexec (https://download.01.org/0day-ci/archive/20260819/[email protected]/config)
compiler: clang version 22.1.8 (https://github.com/llvm/llvm-project ca7933e47d3a3451d81e72ac174dcb5aa28b59d1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260819/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All warnings (new ones prefixed by >>):

>> fs/f2fs/data.c:61:23: warning: variable 'sbi' set but not used [-Wunused-but-set-variable]
      61 |         struct f2fs_sb_info *sbi;
         |                              ^
   1 warning generated.


vim +/sbi +61 fs/f2fs/data.c

f543805fcd60f3 Chao Yu                 2019-12-04  56  
d6966e7ed280ca Matthew Wilcox (Oracle  2025-07-08  57) bool f2fs_is_cp_guaranteed(const struct folio *folio)
36951b38d13ac7 Chao Yu                 2016-11-16  58  {
a824388d911927 Matthew Wilcox (Oracle  2025-07-08  59) 	struct address_space *mapping = folio->mapping;
36951b38d13ac7 Chao Yu                 2016-11-16  60  	struct inode *inode;
36951b38d13ac7 Chao Yu                 2016-11-16 @61  	struct f2fs_sb_info *sbi;
36951b38d13ac7 Chao Yu                 2016-11-16  62  
a824388d911927 Matthew Wilcox (Oracle  2025-07-08  63) 	if (fscrypt_is_bounce_folio(folio))
a824388d911927 Matthew Wilcox (Oracle  2025-07-08  64) 		return folio_test_f2fs_gcing(fscrypt_pagecache_folio(folio));
36951b38d13ac7 Chao Yu                 2016-11-16  65  
36951b38d13ac7 Chao Yu                 2016-11-16  66  	inode = mapping->host;
36951b38d13ac7 Chao Yu                 2016-11-16  67  	sbi = F2FS_I_SB(inode);
36951b38d13ac7 Chao Yu                 2016-11-16  68  
f93483387c4c8d Chao Yu                 2026-08-18  69  	if (S_ISDIR(inode->i_mode))
b763f3bedc2da2 Chao Yu                 2021-04-28  70  		return true;
b763f3bedc2da2 Chao Yu                 2021-04-28  71  
3db1de0e582c35 Daeho Jeong             2022-04-28  72  	if ((S_ISREG(inode->i_mode) && IS_NOQUOTA(inode)) ||
a824388d911927 Matthew Wilcox (Oracle  2025-07-08  73) 			folio_test_f2fs_gcing(folio))
36951b38d13ac7 Chao Yu                 2016-11-16  74  		return true;
36951b38d13ac7 Chao Yu                 2016-11-16  75  	return false;
36951b38d13ac7 Chao Yu                 2016-11-16  76  }
36951b38d13ac7 Chao Yu                 2016-11-16  77  

:::::: The code at line 61 was first introduced by commit
:::::: 36951b38d13ac7cce9fcf89e0e01c22ed0d05688 f2fs: don't wait writeback for datas during checkpoint

:::::: TO: Chao Yu <[email protected]>
:::::: CC: Jaegeuk Kim <[email protected]>

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.