]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: remove stub device info from messages when we have no fs_info
authorDavid Sterba <dsterba@suse.com>
Fri, 13 Nov 2020 16:58:03 +0000 (17:58 +0100)
committerDavid Sterba <dsterba@suse.com>
Tue, 8 Dec 2020 14:54:14 +0000 (15:54 +0100)
commit7ca489e11b0e2a7d5514eed04e5b748abdefa2cb
tree80a32fadb45c120d96009e8827d5d27ab9e194cb
parent5c5d357783437e66d7789428ed2878feced09a2d
btrfs: remove stub device info from messages when we have no fs_info

Without a NULL fs_info the helpers will print something like

BTRFS error (device <unknown>): ...

This can happen in contexts where fs_info is not available at all or
it's potentially unsafe due to object lifetime. The <unknown> stub does
not bring much information and with the prefix makes the message
unnecessarily longer.

Remove it for the NULL fs_info case.

BTRFS error: ...

Callers can add the device information to the message itself if needed.

Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/super.c