| .. | .. |
|---|
| 420 | 420 | blk_mq_sched_free_requests(q); |
|---|
| 421 | 421 | mutex_unlock(&q->sysfs_lock); |
|---|
| 422 | 422 | |
|---|
| 423 | | - percpu_ref_exit(&q->q_usage_counter); |
|---|
| 424 | | - |
|---|
| 425 | 423 | /* @q is and will stay empty, shutdown and put */ |
|---|
| 426 | 424 | blk_put_queue(q); |
|---|
| 427 | 425 | } |
|---|
| .. | .. |
|---|
| 706 | 704 | |
|---|
| 707 | 705 | if (op_is_flush(bio->bi_opf) && !bio_sectors(bio)) |
|---|
| 708 | 706 | return false; |
|---|
| 709 | | - |
|---|
| 710 | | - WARN_ONCE(1, |
|---|
| 711 | | - "Trying to write to read-only block-device %s (partno %d)\n", |
|---|
| 707 | + pr_warn("Trying to write to read-only block-device %s (partno %d)\n", |
|---|
| 712 | 708 | bio_devname(bio, b), part->partno); |
|---|
| 713 | 709 | /* Older lvm-tools actually trigger this */ |
|---|
| 714 | 710 | return false; |
|---|
| .. | .. |
|---|
| 1452 | 1448 | req->q->integrity.profile->complete_fn(req, nr_bytes); |
|---|
| 1453 | 1449 | #endif |
|---|
| 1454 | 1450 | |
|---|
| 1451 | + /* |
|---|
| 1452 | + * Upper layers may call blk_crypto_evict_key() anytime after the last |
|---|
| 1453 | + * bio_endio(). Therefore, the keyslot must be released before that. |
|---|
| 1454 | + */ |
|---|
| 1455 | + if (blk_crypto_rq_has_keyslot(req) && nr_bytes >= blk_rq_bytes(req)) |
|---|
| 1456 | + __blk_crypto_rq_put_keyslot(req); |
|---|
| 1457 | + |
|---|
| 1455 | 1458 | if (unlikely(error && !blk_rq_is_passthrough(req) && |
|---|
| 1456 | 1459 | !(req->rq_flags & RQF_QUIET))) |
|---|
| 1457 | 1460 | print_req_error(req, error, __func__); |
|---|