summaryrefslogtreecommitdiffstats
path: root/block/blk-lib.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-04-05 19:21:23 +0200
committerJens Axboe <axboe@fb.com>2017-04-08 11:25:38 -0600
commit48920ff2a5a940cd07d12cc79e4a2c75f1185aee (patch)
tree0505a85fce20a0d34c5d4bbc71ba8771a037e209 /block/blk-lib.c
parent45c21793a6601b29926d67f7a07fe4077a45072e (diff)
downloadlinux-0-day-48920ff2a5a940cd07d12cc79e4a2c75f1185aee.tar.gz
linux-0-day-48920ff2a5a940cd07d12cc79e4a2c75f1185aee.tar.xz
block: remove the discard_zeroes_data flag
Now that we use the proper REQ_OP_WRITE_ZEROES operation everywhere we can kill this hack. 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>
Diffstat (limited to 'block/blk-lib.c')
-rw-r--r--block/blk-lib.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/block/blk-lib.c b/block/blk-lib.c
index b0c6c4bcf4418..e8caecd71688e 100644
--- a/block/blk-lib.c
+++ b/block/blk-lib.c
@@ -37,17 +37,12 @@ int __blkdev_issue_discard(struct block_device *bdev, sector_t sector,
return -ENXIO;
if (flags & BLKDEV_DISCARD_SECURE) {
- if (flags & BLKDEV_DISCARD_ZERO)
- return -EOPNOTSUPP;
if (!blk_queue_secure_erase(q))
return -EOPNOTSUPP;
op = REQ_OP_SECURE_ERASE;
} else {
if (!blk_queue_discard(q))
return -EOPNOTSUPP;
- if ((flags & BLKDEV_DISCARD_ZERO) &&
- !q->limits.discard_zeroes_data)
- return -EOPNOTSUPP;
op = REQ_OP_DISCARD;
}
@@ -126,7 +121,7 @@ int blkdev_issue_discard(struct block_device *bdev, sector_t sector,
&bio);
if (!ret && bio) {
ret = submit_bio_wait(bio);
- if (ret == -EOPNOTSUPP && !(flags & BLKDEV_DISCARD_ZERO))
+ if (ret == -EOPNOTSUPP)
ret = 0;
bio_put(bio);
}