diff options
-rw-r--r-- | fs/btrfs/scrub.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c index 53c3501fa4ca..85e072b956d5 100644 --- a/fs/btrfs/scrub.c +++ b/fs/btrfs/scrub.c | |||
@@ -542,7 +542,6 @@ static void scrub_print_warning(const char *errstr, struct scrub_block *sblock) | |||
542 | eb = path->nodes[0]; | 542 | eb = path->nodes[0]; |
543 | ei = btrfs_item_ptr(eb, path->slots[0], struct btrfs_extent_item); | 543 | ei = btrfs_item_ptr(eb, path->slots[0], struct btrfs_extent_item); |
544 | item_size = btrfs_item_size_nr(eb, path->slots[0]); | 544 | item_size = btrfs_item_size_nr(eb, path->slots[0]); |
545 | btrfs_release_path(path); | ||
546 | 545 | ||
547 | if (flags & BTRFS_EXTENT_FLAG_TREE_BLOCK) { | 546 | if (flags & BTRFS_EXTENT_FLAG_TREE_BLOCK) { |
548 | do { | 547 | do { |
@@ -558,7 +557,9 @@ static void scrub_print_warning(const char *errstr, struct scrub_block *sblock) | |||
558 | ret < 0 ? -1 : ref_level, | 557 | ret < 0 ? -1 : ref_level, |
559 | ret < 0 ? -1 : ref_root); | 558 | ret < 0 ? -1 : ref_root); |
560 | } while (ret != 1); | 559 | } while (ret != 1); |
560 | btrfs_release_path(path); | ||
561 | } else { | 561 | } else { |
562 | btrfs_release_path(path); | ||
562 | swarn.path = path; | 563 | swarn.path = path; |
563 | swarn.dev = dev; | 564 | swarn.dev = dev; |
564 | iterate_extent_inodes(fs_info, found_key.objectid, | 565 | iterate_extent_inodes(fs_info, found_key.objectid, |