All of lore.kernel.org
 help / color / mirror / Atom feed
* [bug report] btrfs: abort transaction in the process_one_buffer() log tree walk callback
@ 2025-08-15  6:49 Dan Carpenter
  2025-08-15  8:28 ` Filipe Manana
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2025-08-15  6:49 UTC (permalink / raw)
  To: Filipe Manana; +Cc: linux-btrfs

Hello Filipe Manana,

This is a semi-automatic email about new static checker warnings.

Commit f6f79221b128 ("btrfs: abort transaction in the
process_one_buffer() log tree walk callback") from Jul 16, 2025,
leads to the following Smatch complaint:

fs/btrfs/tree-log.c:377 process_one_buffer() warn: variable dereferenced before check 'trans' (see line 375)
fs/btrfs/tree-log.c:388 process_one_buffer() warn: variable dereferenced before check 'trans' (see line 375)

fs/btrfs/tree-log.c
   374		if (wc->pin) {
   375			ret = btrfs_pin_extent_for_log_replay(trans, eb);
                                                              ^^^^^
The patch adds a dereference

   376			if (ret) {
   377				if (trans)
                                    ^^^^^
And also this check which is too late.

   378					btrfs_abort_transaction(trans, ret);
   379				else

regards,
dan carpenter

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

end of thread, other threads:[~2025-08-15 11:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-15  6:49 [bug report] btrfs: abort transaction in the process_one_buffer() log tree walk callback Dan Carpenter
2025-08-15  8:28 ` Filipe Manana
2025-08-15  9:13   ` Dan Carpenter
2025-08-15 11:28     ` Filipe Manana

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.