All of lore.kernel.org
 help / color / mirror / Atom feed
* [koverstreet-bcachefs:bcachefs-rebalance_v2 467/799] fs/bcachefs/vfs/fs.c:360 bch2_inode_hash_find() warn: inconsistent returns '&inode->v.i_lock'.
@ 2026-01-26 23:01 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2026-01-26 23:01 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp, Dan Carpenter

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: Kent Overstreet <kent.overstreet@linux.dev>

tree:   https://github.com/koverstreet/bcachefs bcachefs-rebalance_v2
head:   d4b3d00447faf8d4d95db47e3902e4ca4db8fbdc
commit: 221177ea260493d2314aa23273a9bc7fe93529c5 [467/799] bcachefs: move vfs-specific code to vfs/
:::::: branch date: 3 months ago
:::::: commit date: 3 months ago
config: parisc-randconfig-r071-20260127 (https://download.01.org/0day-ci/archive/20260127/202601270616.M4JJ7rmO-lkp@intel.com/config)
compiler: hppa-linux-gcc (GCC) 10.5.0
smatch version: v0.5.0-8994-gd50c5a4c

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>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202601270616.M4JJ7rmO-lkp@intel.com/

smatch warnings:
fs/bcachefs/vfs/fs.c:360 bch2_inode_hash_find() warn: inconsistent returns '&inode->v.i_lock'.

vim +360 fs/bcachefs/vfs/fs.c

112d21fd1a122f fs/bcachefs/fs.c Kent Overstreet 2024-06-08  332  
54f7702466b3a1 fs/bcachefs/fs.c Kent Overstreet 2024-08-16  333  static struct bch_inode_info *bch2_inode_hash_find(struct bch_fs *c, struct btree_trans *trans,
54f7702466b3a1 fs/bcachefs/fs.c Kent Overstreet 2024-08-16  334  						   subvol_inum inum)
112d21fd1a122f fs/bcachefs/fs.c Kent Overstreet 2024-06-08  335  {
112d21fd1a122f fs/bcachefs/fs.c Kent Overstreet 2024-06-08  336  	struct bch_inode_info *inode;
112d21fd1a122f fs/bcachefs/fs.c Kent Overstreet 2024-06-08  337  repeat:
112d21fd1a122f fs/bcachefs/fs.c Kent Overstreet 2024-06-08  338  	inode = __bch2_inode_hash_find(c, inum);
112d21fd1a122f fs/bcachefs/fs.c Kent Overstreet 2024-06-08  339  	if (inode) {
112d21fd1a122f fs/bcachefs/fs.c Kent Overstreet 2024-06-08  340  		spin_lock(&inode->v.i_lock);
112d21fd1a122f fs/bcachefs/fs.c Kent Overstreet 2024-06-08  341  		if (!test_bit(EI_INODE_HASHED, &inode->ei_flags)) {
112d21fd1a122f fs/bcachefs/fs.c Kent Overstreet 2024-06-08  342  			spin_unlock(&inode->v.i_lock);
112d21fd1a122f fs/bcachefs/fs.c Kent Overstreet 2024-06-08  343  			return NULL;
112d21fd1a122f fs/bcachefs/fs.c Kent Overstreet 2024-06-08  344  		}
112d21fd1a122f fs/bcachefs/fs.c Kent Overstreet 2024-06-08  345  		if ((inode->v.i_state & (I_FREEING|I_WILL_FREE))) {
54f7702466b3a1 fs/bcachefs/fs.c Kent Overstreet 2024-08-16  346  			if (!trans) {
6b63a948a73ba3 fs/bcachefs/fs.c Kent Overstreet 2024-10-04  347  				__wait_on_freeing_inode(c, inode, inum);
54f7702466b3a1 fs/bcachefs/fs.c Kent Overstreet 2024-08-16  348  			} else {
83ecd1b122f49c fs/bcachefs/fs.c Kent Overstreet 2025-04-13  349  				int ret = drop_locks_do(trans,
83ecd1b122f49c fs/bcachefs/fs.c Kent Overstreet 2025-04-13  350  						(__wait_on_freeing_inode(c, inode, inum), 0));
54f7702466b3a1 fs/bcachefs/fs.c Kent Overstreet 2024-08-16  351  				if (ret)
54f7702466b3a1 fs/bcachefs/fs.c Kent Overstreet 2024-08-16  352  					return ERR_PTR(ret);
54f7702466b3a1 fs/bcachefs/fs.c Kent Overstreet 2024-08-16  353  			}
112d21fd1a122f fs/bcachefs/fs.c Kent Overstreet 2024-06-08  354  			goto repeat;
112d21fd1a122f fs/bcachefs/fs.c Kent Overstreet 2024-06-08  355  		}
112d21fd1a122f fs/bcachefs/fs.c Kent Overstreet 2024-06-08  356  		__iget(&inode->v);
112d21fd1a122f fs/bcachefs/fs.c Kent Overstreet 2024-06-08  357  		spin_unlock(&inode->v.i_lock);
112d21fd1a122f fs/bcachefs/fs.c Kent Overstreet 2024-06-08  358  	}
112d21fd1a122f fs/bcachefs/fs.c Kent Overstreet 2024-06-08  359  
112d21fd1a122f fs/bcachefs/fs.c Kent Overstreet 2024-06-08 @360  	return inode;
112d21fd1a122f fs/bcachefs/fs.c Kent Overstreet 2024-06-08  361  }
112d21fd1a122f fs/bcachefs/fs.c Kent Overstreet 2024-06-08  362  

:::::: The code at line 360 was first introduced by commit
:::::: 112d21fd1a122f778c383aa44d5448f4da9518c3 bcachefs: switch to rhashtable for vfs inodes hash

:::::: TO: Kent Overstreet <kent.overstreet@linux.dev>
:::::: CC: Kent Overstreet <kent.overstreet@linux.dev>

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [koverstreet-bcachefs:bcachefs-rebalance_v2 467/799] fs/bcachefs/vfs/fs.c:360 bch2_inode_hash_find() warn: inconsistent returns '&inode->v.i_lock'.
@ 2026-05-14 20:42 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2026-05-14 20:42 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp, Dan Carpenter

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: Kent Overstreet <kent.overstreet@linux.dev>

tree:   https://github.com/koverstreet/bcachefs bcachefs-rebalance_v2
head:   d4b3d00447faf8d4d95db47e3902e4ca4db8fbdc
commit: 221177ea260493d2314aa23273a9bc7fe93529c5 [467/799] bcachefs: move vfs-specific code to vfs/
:::::: branch date: 6 months ago
:::::: commit date: 7 months ago
config: riscv-randconfig-r073-20260514 (https://download.01.org/0day-ci/archive/20260515/202605150441.ClakfxbR-lkp@intel.com/config)
compiler: riscv64-linux-gcc (GCC) 12.5.0
smatch: v0.5.0-9185-gbcc58b9c

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>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202605150441.ClakfxbR-lkp@intel.com/

smatch warnings:
fs/bcachefs/vfs/fs.c:360 bch2_inode_hash_find() warn: inconsistent returns '&inode->v.i_lock'.

vim +360 fs/bcachefs/vfs/fs.c

112d21fd1a122f7 fs/bcachefs/fs.c Kent Overstreet 2024-06-08  332  
54f7702466b3a10 fs/bcachefs/fs.c Kent Overstreet 2024-08-16  333  static struct bch_inode_info *bch2_inode_hash_find(struct bch_fs *c, struct btree_trans *trans,
54f7702466b3a10 fs/bcachefs/fs.c Kent Overstreet 2024-08-16  334  						   subvol_inum inum)
112d21fd1a122f7 fs/bcachefs/fs.c Kent Overstreet 2024-06-08  335  {
112d21fd1a122f7 fs/bcachefs/fs.c Kent Overstreet 2024-06-08  336  	struct bch_inode_info *inode;
112d21fd1a122f7 fs/bcachefs/fs.c Kent Overstreet 2024-06-08  337  repeat:
112d21fd1a122f7 fs/bcachefs/fs.c Kent Overstreet 2024-06-08  338  	inode = __bch2_inode_hash_find(c, inum);
112d21fd1a122f7 fs/bcachefs/fs.c Kent Overstreet 2024-06-08  339  	if (inode) {
112d21fd1a122f7 fs/bcachefs/fs.c Kent Overstreet 2024-06-08  340  		spin_lock(&inode->v.i_lock);
112d21fd1a122f7 fs/bcachefs/fs.c Kent Overstreet 2024-06-08  341  		if (!test_bit(EI_INODE_HASHED, &inode->ei_flags)) {
112d21fd1a122f7 fs/bcachefs/fs.c Kent Overstreet 2024-06-08  342  			spin_unlock(&inode->v.i_lock);
112d21fd1a122f7 fs/bcachefs/fs.c Kent Overstreet 2024-06-08  343  			return NULL;
112d21fd1a122f7 fs/bcachefs/fs.c Kent Overstreet 2024-06-08  344  		}
112d21fd1a122f7 fs/bcachefs/fs.c Kent Overstreet 2024-06-08  345  		if ((inode->v.i_state & (I_FREEING|I_WILL_FREE))) {
54f7702466b3a10 fs/bcachefs/fs.c Kent Overstreet 2024-08-16  346  			if (!trans) {
6b63a948a73ba3d fs/bcachefs/fs.c Kent Overstreet 2024-10-04  347  				__wait_on_freeing_inode(c, inode, inum);
54f7702466b3a10 fs/bcachefs/fs.c Kent Overstreet 2024-08-16  348  			} else {
83ecd1b122f49c9 fs/bcachefs/fs.c Kent Overstreet 2025-04-13  349  				int ret = drop_locks_do(trans,
83ecd1b122f49c9 fs/bcachefs/fs.c Kent Overstreet 2025-04-13  350  						(__wait_on_freeing_inode(c, inode, inum), 0));
54f7702466b3a10 fs/bcachefs/fs.c Kent Overstreet 2024-08-16  351  				if (ret)
54f7702466b3a10 fs/bcachefs/fs.c Kent Overstreet 2024-08-16  352  					return ERR_PTR(ret);
54f7702466b3a10 fs/bcachefs/fs.c Kent Overstreet 2024-08-16  353  			}
112d21fd1a122f7 fs/bcachefs/fs.c Kent Overstreet 2024-06-08  354  			goto repeat;
112d21fd1a122f7 fs/bcachefs/fs.c Kent Overstreet 2024-06-08  355  		}
112d21fd1a122f7 fs/bcachefs/fs.c Kent Overstreet 2024-06-08  356  		__iget(&inode->v);
112d21fd1a122f7 fs/bcachefs/fs.c Kent Overstreet 2024-06-08  357  		spin_unlock(&inode->v.i_lock);
112d21fd1a122f7 fs/bcachefs/fs.c Kent Overstreet 2024-06-08  358  	}
112d21fd1a122f7 fs/bcachefs/fs.c Kent Overstreet 2024-06-08  359  
112d21fd1a122f7 fs/bcachefs/fs.c Kent Overstreet 2024-06-08 @360  	return inode;
112d21fd1a122f7 fs/bcachefs/fs.c Kent Overstreet 2024-06-08  361  }
112d21fd1a122f7 fs/bcachefs/fs.c Kent Overstreet 2024-06-08  362  

:::::: The code at line 360 was first introduced by commit
:::::: 112d21fd1a122f778c383aa44d5448f4da9518c3 bcachefs: switch to rhashtable for vfs inodes hash

:::::: TO: Kent Overstreet <kent.overstreet@linux.dev>
:::::: CC: Kent Overstreet <kent.overstreet@linux.dev>

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-05-14 21:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-26 23:01 [koverstreet-bcachefs:bcachefs-rebalance_v2 467/799] fs/bcachefs/vfs/fs.c:360 bch2_inode_hash_find() warn: inconsistent returns '&inode->v.i_lock' kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2026-05-14 20:42 kernel test robot

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.