]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
btrfs: remove redundant refcount check in btrfs_put_transaction()
authorXuanqiang Luo <luoxuanqiang@kylinos.cn>
Wed, 15 Oct 2025 07:05:21 +0000 (15:05 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 24 Nov 2025 21:03:02 +0000 (22:03 +0100)
commit225e747ea57781198b44cb65373d076865c51a7a
tree78cdc7bb0ab075417cf89be52d4b619559fcdcd7
parenta232ff90d14657c8637c6e94b606bb5d700a2ecb
btrfs: remove redundant refcount check in btrfs_put_transaction()

Eric Dumazet removed the redundant refcount check for sk_refcnt, I
noticed a similar issue in btrfs_put_transaction().
refcount_dec_and_test() already checks for a zero refcount and
complains, making the preceding WARN_ON redundant. This is a leftover
from the atomic_t times.

Signed-off-by: Xuanqiang Luo <luoxuanqiang@kylinos.cn>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/transaction.c