diff options
Diffstat (limited to 'block/blk-lib.c')
-rw-r--r-- | block/blk-lib.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/block/blk-lib.c b/block/blk-lib.c index c1fc55a83ba1..c392029a104e 100644 --- a/block/blk-lib.c +++ b/block/blk-lib.c | |||
@@ -62,6 +62,12 @@ int blkdev_issue_discard(struct block_device *bdev, sector_t sector, | |||
62 | max_discard_sectors &= ~(disc_sects - 1); | 62 | max_discard_sectors &= ~(disc_sects - 1); |
63 | } | 63 | } |
64 | 64 | ||
65 | if (flags & BLKDEV_IFL_SECURE) { | ||
66 | if (!blk_queue_secdiscard(q)) | ||
67 | return -EOPNOTSUPP; | ||
68 | type |= DISCARD_SECURE; | ||
69 | } | ||
70 | |||
65 | while (nr_sects && !ret) { | 71 | while (nr_sects && !ret) { |
66 | bio = bio_alloc(gfp_mask, 1); | 72 | bio = bio_alloc(gfp_mask, 1); |
67 | if (!bio) { | 73 | if (!bio) { |