diff options
-rw-r--r-- | fs/btrfs/extent-tree.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index a340eeedd6c7..9e0869959cde 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c | |||
@@ -1611,8 +1611,13 @@ check_pending: | |||
1611 | } | 1611 | } |
1612 | ins->offset = num_bytes; | 1612 | ins->offset = num_bytes; |
1613 | btrfs_free_path(path); | 1613 | btrfs_free_path(path); |
1614 | if (last_ptr) | 1614 | if (last_ptr) { |
1615 | *last_ptr = ins->objectid + ins->offset; | 1615 | *last_ptr = ins->objectid + ins->offset; |
1616 | if (*last_ptr == | ||
1617 | btrfs_super_total_bytes(&root->fs_info->super_copy)) { | ||
1618 | *last_ptr = 0; | ||
1619 | } | ||
1620 | } | ||
1616 | return 0; | 1621 | return 0; |
1617 | 1622 | ||
1618 | new_group: | 1623 | new_group: |