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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Jan 2021 10:55:06 +0000 (11:55 +0100)
commitdbba7a38b0074412b22b8ac41092015e1dae12ae
tree520c9e7e715cc115a08358ab37eaf14fae2202be
parent1f54a26bdb60081e1ec9637236edf863339a1514
btrfs: print the actual offset in btrfs_root_name

[ Upstream commit 71008734d27f2276fcef23a5e546d358430f2d52 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/btrfs/disk-io.c
fs/btrfs/print-tree.c
fs/btrfs/print-tree.h