From: Filipe Manana Date: Thu, 19 Feb 2026 15:37:59 +0000 (+0000) Subject: btrfs: stop printing condition result in assertion failure messages X-Git-Tag: ceph-for-7.1-rc4~321^2~75 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d821d4f6fb804d2579b4523e591cb6dd03a49b86;p=ceph-client.git btrfs: stop printing condition result in assertion failure messages It's useless to print the result of the condition, it's always 0 if the assertion is triggered, so it doesn't provide any useful information. Examples: assertion failed: cb->bbio.bio.bi_iter.bi_size == disk_num_bytes :: 0, in inode.c:9991 assertion failed: folio_test_writeback(folio) :: 0, in subpage.c:476 So stop printing that, it's always ":: 0" for any assertion triggered (except for conditions that are just an identifier). Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba --- diff --git a/fs/btrfs/messages.h b/fs/btrfs/messages.h index c8e92efce405..556d4e79cde6 100644 --- a/fs/btrfs/messages.h +++ b/fs/btrfs/messages.h @@ -144,11 +144,11 @@ do { \ verify_assert_printk_format("check the format string" args); \ if (!likely(cond)) { \ if (("" __FIRST_ARG(args) [0]) == 0) { \ - pr_err("assertion failed: %s :: %ld, in %s:%d\n", \ - #cond, (long)(cond), __FILE__, __LINE__); \ + pr_err("assertion failed: %s, in %s:%d\n", \ + #cond, __FILE__, __LINE__); \ } else { \ - pr_err("assertion failed: %s :: %ld, in %s:%d (" __FIRST_ARG(args) ")\n", \ - #cond, (long)(cond), __FILE__, __LINE__ __REST_ARGS(args)); \ + pr_err("assertion failed: %s, in %s:%d (" __FIRST_ARG(args) ")\n", \ + #cond, __FILE__, __LINE__ __REST_ARGS(args)); \ } \ BUG(); \ } \