From: kernel test robot <lkp@intel.com>
To: Kent Overstreet <kent.overstreet@linux.dev>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [koverstreet-bcachefs:trace_sched_wakeup_backtrace 57/332] fs/bcachefs/snapshots/snapshot.c:378:7: warning: variable 'lock_dropped' set but not used
Date: Sun, 13 Sep 2026 07:08:23 +0200 [thread overview]
Message-ID: <202609130706.MIJr23Rk-lkp@intel.com> (raw)
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
reply other threads:[~2026-09-13 5:08 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=202609130706.MIJr23Rk-lkp@intel.com \
--to=lkp@intel.com \
--cc=kent.overstreet@linux.dev \
--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.