diff options
Diffstat (limited to 'block/blk-core.c')
-rw-r--r-- | block/blk-core.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/block/blk-core.c b/block/blk-core.c index 7da630e25ae7..ee1a1e7e63cc 100644 --- a/block/blk-core.c +++ b/block/blk-core.c | |||
@@ -1514,7 +1514,10 @@ static inline void __generic_make_request(struct bio *bio) | |||
1514 | if (bio_check_eod(bio, nr_sectors)) | 1514 | if (bio_check_eod(bio, nr_sectors)) |
1515 | goto end_io; | 1515 | goto end_io; |
1516 | 1516 | ||
1517 | if ((bio->bi_rw & REQ_DISCARD) && !blk_queue_discard(q)) { | 1517 | if ((bio->bi_rw & REQ_DISCARD) && |
1518 | (!blk_queue_discard(q) || | ||
1519 | ((bio->bi_rw & REQ_SECURE) && | ||
1520 | !blk_queue_secdiscard(q)))) { | ||
1518 | err = -EOPNOTSUPP; | 1521 | err = -EOPNOTSUPP; |
1519 | goto end_io; | 1522 | goto end_io; |
1520 | } | 1523 | } |