btrfs: zoned: redirty released extent buffers
[sfrench/cifs-2.6.git] / fs / btrfs / disk-io.c
index 8551b0fc1b22082da57d42ccabfd8c9812dab7df..eb1afd7d89f75fd3446d9b6880320c6ba7ab75a0 100644 (file)
@@ -459,6 +459,12 @@ static int csum_dirty_buffer(struct btrfs_fs_info *fs_info, struct bio_vec *bvec
                return 0;
 
        found_start = btrfs_header_bytenr(eb);
+
+       if (test_bit(EXTENT_BUFFER_NO_CHECK, &eb->bflags)) {
+               WARN_ON(found_start != 0);
+               return 0;
+       }
+
        /*
         * Please do not consolidate these warnings into a single if.
         * It is useful to know what went wrong.
@@ -4774,6 +4780,8 @@ void btrfs_cleanup_one_transaction(struct btrfs_transaction *cur_trans,
                                     EXTENT_DIRTY);
        btrfs_destroy_pinned_extent(fs_info, &cur_trans->pinned_extents);
 
+       btrfs_free_redirty_list(cur_trans);
+
        cur_trans->state =TRANS_STATE_COMPLETED;
        wake_up(&cur_trans->commit_wait);
 }