dm: remove impossible BUG_ON in __send_empty_flush
authorMike Snitzer <snitzer@redhat.com>
Fri, 18 Feb 2022 04:40:16 +0000 (23:40 -0500)
committerMike Snitzer <snitzer@redhat.com>
Mon, 21 Feb 2022 20:36:26 +0000 (15:36 -0500)
The flush_bio in question was just initialized to be empty, so there
is no way bio_has_data() will return true.  So remove stale BUG_ON().

Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm.c

index fb129fe..c7246b0 100644 (file)
@@ -1274,7 +1274,6 @@ static int __send_empty_flush(struct clone_info *ci)
        ci->bio = &flush_bio;
        ci->sector_count = 0;
 
-       BUG_ON(bio_has_data(ci->bio));
        while ((ti = dm_table_get_target(ci->map, target_nr++)))
                __send_duplicate_bios(ci, ti, ti->num_flush_bios, NULL);