diff options
Diffstat (limited to 'fs/btrfs/print-tree.c')
-rw-r--r-- | fs/btrfs/print-tree.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/fs/btrfs/print-tree.c b/fs/btrfs/print-tree.c index 9c1335dad40c..ee0de112cf5a 100644 --- a/fs/btrfs/print-tree.c +++ b/fs/btrfs/print-tree.c | |||
@@ -37,22 +37,11 @@ static void print_chunk(struct extent_buffer *eb, struct btrfs_chunk *chunk) | |||
37 | static void print_dev_item(struct extent_buffer *eb, | 37 | static void print_dev_item(struct extent_buffer *eb, |
38 | struct btrfs_dev_item *dev_item) | 38 | struct btrfs_dev_item *dev_item) |
39 | { | 39 | { |
40 | char *name; | 40 | printk("\t\tdev item devid %llu " |
41 | int name_len; | 41 | "total_bytes %llu bytes used %Lu\n", |
42 | |||
43 | name_len = btrfs_device_name_len(eb, dev_item); | ||
44 | name = kmalloc(name_len, GFP_NOFS); | ||
45 | if (name) { | ||
46 | read_extent_buffer(eb, name, | ||
47 | (unsigned long)btrfs_device_name(dev_item), | ||
48 | name_len); | ||
49 | } | ||
50 | printk("\t\tdev item name %.*s devid %llu " | ||
51 | "total_bytes %llu bytes used %Lu\n", name_len, name, | ||
52 | (unsigned long long)btrfs_device_id(eb, dev_item), | 42 | (unsigned long long)btrfs_device_id(eb, dev_item), |
53 | (unsigned long long)btrfs_device_total_bytes(eb, dev_item), | 43 | (unsigned long long)btrfs_device_total_bytes(eb, dev_item), |
54 | (unsigned long long)btrfs_device_bytes_used(eb, dev_item)); | 44 | (unsigned long long)btrfs_device_bytes_used(eb, dev_item)); |
55 | kfree(name); | ||
56 | } | 45 | } |
57 | void btrfs_print_leaf(struct btrfs_root *root, struct extent_buffer *l) | 46 | void btrfs_print_leaf(struct btrfs_root *root, struct extent_buffer *l) |
58 | { | 47 | { |