All of lore.kernel.org
 help / color / mirror / Atom feed
* [koverstreet-bcachefs:trace_sched_wakeup_backtrace 57/332] fs/bcachefs/snapshots/snapshot.c:378:7: warning: variable 'lock_dropped' set but not used
@ 2026-09-13  5:08 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-09-13  5:08 UTC (permalink / raw)
  To: Kent Overstreet; +Cc: oe-kbuild-all

tree:   https://github.com/koverstreet/bcachefs trace_sched_wakeup_backtrace
head:   9e7cbd4ad9c7a7ba461dbba9185628c006e200cd
commit: 54998105f6ef5d0c64d7986fd6f670d2b4f3bef4 [57/332] bcachefs: Drop locks for printbuf allocation in snapshot_get_print()
config: xtensa-randconfig-r073-20260913 (https://download.01.org/0day-ci/archive/20260913/202609130706.MIJr23Rk-lkp@intel.com/config)
compiler: xtensa-linux-gcc (GCC) 10.5.0
smatch: v0.5.0-9187-g5189e3fb
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260913/202609130706.MIJr23Rk-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/202609130706.MIJr23Rk-lkp@intel.com/

All warnings (new ones prefixed by >>):

   fs/bcachefs/snapshots/snapshot.c: In function 'snapshot_get_print':
>> fs/bcachefs/snapshots/snapshot.c:378:7: warning: variable 'lock_dropped' set but not used [-Wunused-but-set-variable]
     378 |  bool lock_dropped = false;
         |       ^~~~~~~~~~~~


vim +/lock_dropped +378 fs/bcachefs/snapshots/snapshot.c

   330	
   331	static int snapshot_get_print(struct printbuf *out, struct btree_trans *trans, u32 id)
   332	{
   333		prt_printf(out, "%u \t", id);
   334	
   335		struct bch_snapshot s;
   336		int ret = bch2_snapshot_lookup(trans, id, &s);
   337		if (bch2_err_matches(ret, BCH_ERR_transaction_restart))
   338			return ret;
   339	
   340		if (ret) {
   341			prt_str(out, bch2_err_str(ret));
   342		} else {
   343			if (BCH_SNAPSHOT_DELETED(&s))
   344				prt_str(out, "deleted ");
   345			if (BCH_SNAPSHOT_NO_KEYS(&s))
   346				prt_str(out, "no_keys ");
   347			if (BCH_SNAPSHOT_WILL_DELETE(&s))
   348				prt_str(out, "will_delete ");
   349			if (BCH_SNAPSHOT_SUBVOL(&s))
   350				prt_printf(out, "subvol %u", le32_to_cpu(s.subvol));
   351	
   352			prt_tab(out);
   353	
   354			if (s.subvol) {
   355				struct bch_subvolume subvol;
   356				ret = bch2_subvolume_get(trans, le32_to_cpu(s.subvol), false, &subvol);
   357				if (bch2_err_matches(ret, BCH_ERR_transaction_restart))
   358					return ret;
   359	
   360				if (ret)
   361					prt_str(out, bch2_err_str(ret));
   362				else
   363					try(bch2_inum_to_path(trans, (subvol_inum)
   364						{ le32_to_cpu(s.subvol), le64_to_cpu(subvol.inode) }, out));
   365			}
   366	
   367			prt_tab(out);
   368	
   369			u64 v[1] = { 0 };
   370			try(bch2_fs_accounting_read_key2(trans, v, snapshot, id));
   371	
   372			prt_human_readable_u64(out, v[0] << 9);
   373			prt_tab_rjust(out);
   374		}
   375	
   376		prt_newline(out);
   377	
 > 378		bool lock_dropped = false;
   379		allocate_dropping_locks_norelock(trans, lock_dropped,
   380				!bch2_printbuf_make_room_gfp(out, 1024, _gfp));
   381		return 0;
   382	}
   383	

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-13  5:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-13  5:08 [koverstreet-bcachefs:trace_sched_wakeup_backtrace 57/332] fs/bcachefs/snapshots/snapshot.c:378:7: warning: variable 'lock_dropped' set but not used 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.