aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/disk-io.c
diff options
context:
space:
mode:
authorJosef Bacik <josef@toxicpanda.com>2020-12-16 11:18:44 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-01-27 11:55:06 +0100
commitdbba7a38b0074412b22b8ac41092015e1dae12ae (patch)
tree520c9e7e715cc115a08358ab37eaf14fae2202be /fs/btrfs/disk-io.c
parent1f54a26bdb60081e1ec9637236edf863339a1514 (diff)
downloadkernel_replicant_linux-dbba7a38b0074412b22b8ac41092015e1dae12ae.tar.gz
kernel_replicant_linux-dbba7a38b0074412b22b8ac41092015e1dae12ae.tar.bz2
kernel_replicant_linux-dbba7a38b0074412b22b8ac41092015e1dae12ae.zip
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>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r--fs/btrfs/disk-io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index af97ddcc6b3e..56f3b9acd215 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -1482,7 +1482,7 @@ void btrfs_check_leaked_roots(struct btrfs_fs_info *fs_info)
root = list_first_entry(&fs_info->allocated_roots,
struct btrfs_root, leak_list);
btrfs_err(fs_info, "leaked root %s refcount %d",
- btrfs_root_name(root->root_key.objectid, buf),
+ btrfs_root_name(&root->root_key, buf),
refcount_read(&root->refs));
while (refcount_read(&root->refs) > 1)
btrfs_put_root(root);