btrfs: print the actual offset in btrfs_root_name
authorJosef Bacik <josef@toxicpanda.com>
Wed, 16 Dec 2020 16:18:44 +0000 (11:18 -0500)
committerDavid Sterba <dsterba@suse.com>
Thu, 7 Jan 2021 16:25:05 +0000 (17:25 +0100)
commit71008734d27f2276fcef23a5e546d358430f2d52
tree586f1c1abd338127c95b8ff22d92122e3c8864ec
parenta8cc263eb58ca133617662a5a5e07131d0ebf299
btrfs: print the actual offset in btrfs_root_name

We're supposed to print the root_key.offset in btrfs_root_name in the
case of a reloc root, not the objectid.  Fix this helper to take the key
so we have access to the offset when we need it.

Fixes: 457f1864b569 ("btrfs: pretty print leaked root name")
Reviewed-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/disk-io.c
fs/btrfs/print-tree.c
fs/btrfs/print-tree.h