btrfs: constify fs_info parameter in __btrfs_panic()
authorDavid Sterba <dsterba@suse.com>
Tue, 21 Nov 2023 13:20:19 +0000 (14:20 +0100)
committerDavid Sterba <dsterba@suse.com>
Fri, 15 Dec 2023 19:27:02 +0000 (20:27 +0100)
The printk helpers take const fs_info if it's used just for the
identifier in the messages, __btrfs_panic() lacks that.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/messages.c
fs/btrfs/messages.h

index b8f9c9e..cdada48 100644 (file)
@@ -287,7 +287,7 @@ void __cold btrfs_err_32bit_limit(struct btrfs_fs_info *fs_info)
  * panic or BUGs, depending on mount options.
  */
 __cold
-void __btrfs_panic(struct btrfs_fs_info *fs_info, const char *function,
+void __btrfs_panic(const struct btrfs_fs_info *fs_info, const char *function,
                   unsigned int line, int error, const char *fmt, ...)
 {
        char *s_id = "<unknown>";
index 4d04c1f..08a9272 100644 (file)
@@ -194,7 +194,7 @@ const char * __attribute_const__ btrfs_decode_error(int error);
 
 __printf(5, 6)
 __cold
-void __btrfs_panic(struct btrfs_fs_info *fs_info, const char *function,
+void __btrfs_panic(const struct btrfs_fs_info *fs_info, const char *function,
                   unsigned int line, int error, const char *fmt, ...);
 /*
  * If BTRFS_MOUNT_PANIC_ON_FATAL_ERROR is in mount_opt, __btrfs_panic