@@ -282,8 +282,6 @@ struct pool {
282
282
struct dm_bio_prison_cell * * cell_sort_array ;
283
283
284
284
mempool_t mapping_pool ;
285
-
286
- struct bio flush_bio ;
287
285
};
288
286
289
287
static void metadata_operation_failed (struct pool * pool , const char * op , int r );
@@ -2906,7 +2904,6 @@ static void __pool_destroy(struct pool *pool)
2906
2904
if (pool -> next_mapping )
2907
2905
mempool_free (pool -> next_mapping , & pool -> mapping_pool );
2908
2906
mempool_exit (& pool -> mapping_pool );
2909
- bio_uninit (& pool -> flush_bio );
2910
2907
dm_deferred_set_destroy (pool -> shared_read_ds );
2911
2908
dm_deferred_set_destroy (pool -> all_io_ds );
2912
2909
kfree (pool );
@@ -2987,7 +2984,6 @@ static struct pool *pool_create(struct mapped_device *pool_md,
2987
2984
pool -> low_water_triggered = false;
2988
2985
pool -> suspended = true;
2989
2986
pool -> out_of_data_space = false;
2990
- bio_init (& pool -> flush_bio , NULL , 0 );
2991
2987
2992
2988
pool -> shared_read_ds = dm_deferred_set_create ();
2993
2989
if (!pool -> shared_read_ds ) {
@@ -3194,13 +3190,8 @@ static void metadata_low_callback(void *context)
3194
3190
static int metadata_pre_commit_callback (void * context )
3195
3191
{
3196
3192
struct pool * pool = context ;
3197
- struct bio * flush_bio = & pool -> flush_bio ;
3198
-
3199
- bio_reset (flush_bio );
3200
- bio_set_dev (flush_bio , pool -> data_dev );
3201
- flush_bio -> bi_opf = REQ_OP_WRITE | REQ_PREFLUSH ;
3202
3193
3203
- return submit_bio_wait ( flush_bio );
3194
+ return blkdev_issue_flush ( pool -> data_dev );
3204
3195
}
3205
3196
3206
3197
static sector_t get_dev_size (struct block_device * bdev )
0 commit comments