]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - block/blk-core.c
tg3: Update version to 3.114
[net-next-2.6.git] / block / blk-core.c
index 7da630e25ae7a4d7b82623a10d2c99233bb28f5a..ee1a1e7e63ccfc3e735566e3725febee1890bb2e 100644 (file)
@@ -1514,7 +1514,10 @@ static inline void __generic_make_request(struct bio *bio)
                if (bio_check_eod(bio, nr_sectors))
                        goto end_io;
 
-               if ((bio->bi_rw & REQ_DISCARD) && !blk_queue_discard(q)) {
+               if ((bio->bi_rw & REQ_DISCARD) &&
+                   (!blk_queue_discard(q) ||
+                    ((bio->bi_rw & REQ_SECURE) &&
+                     !blk_queue_secdiscard(q)))) {
                        err = -EOPNOTSUPP;
                        goto end_io;
                }