block: stop using blkdev_issue_write_same for zeroing
authorChristoph Hellwig <hch@lst.de>
Wed, 5 Apr 2017 17:21:07 +0000 (19:21 +0200)
committerJens Axboe <axboe@fb.com>
Sat, 8 Apr 2017 17:25:38 +0000 (11:25 -0600)
We'll always use the WRITE ZEROES code for zeroing now.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/blk-lib.c

index e5b853f2b8a25e3ca93ba39784b9cf3e1cf4afc3..2a8d638544a714ae21aa00e052ad579e1aa3b3d6 100644 (file)
@@ -364,10 +364,6 @@ int blkdev_issue_zeroout(struct block_device *bdev, sector_t sector,
                        return 0;
        }
 
-       if (!blkdev_issue_write_same(bdev, sector, nr_sects, gfp_mask,
-                       ZERO_PAGE(0)))
-               return 0;
-
        blk_start_plug(&plug);
        ret = __blkdev_issue_zeroout(bdev, sector, nr_sects, gfp_mask,
                        &bio, discard);