diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-12-12 13:24:00 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-12-12 13:24:00 -0500 |
commit | 7807563183c4c1bec1bcc815e8bcc40d807c81b7 (patch) | |
tree | 4730f566d6391fdd597ad964c2d4d8870832b1ce /block | |
parent | 6539756e68bf8fab1dfc08bddf00d9fbba8c071f (diff) | |
parent | af096e2235c5de76af7e8749f59a90de07f5e943 (diff) |
Merge branch 'for-linus' of git://git.kernel.dk/linux-block
Pull block layer fixes from Jens Axboe:
"A set of fixes for the current series. This contains:
- A bunch of fixes for lightnvm, should be the last round for this
series. From Matias and Wenwei.
- A writeback detach inode fix from Ilya, also marked for stable.
- A block (though it says SCSI) fix for an OOPS in SCSI runtime power
management.
- Module init error path fixes for null_blk from Minfei"
* 'for-linus' of git://git.kernel.dk/linux-block:
null_blk: Fix error path in module initialization
lightnvm: do not compile in debugging by default
lightnvm: prevent gennvm module unload on use
lightnvm: fix media mgr registration
lightnvm: replace req queue with nvmdev for lld
lightnvm: comments on constants
lightnvm: check mm before use
lightnvm: refactor spin_unlock in gennvm_get_blk
lightnvm: put blks when luns configure failed
lightnvm: use flags in rrpc_get_blk
block: detach bdev inode from its wb in __blkdev_put()
SCSI: Fix NULL pointer dereference in runtime PM
Diffstat (limited to 'block')
-rw-r--r-- | block/blk-core.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/block/blk-core.c b/block/blk-core.c index a0af4043dda2..3636be469fa2 100644 --- a/block/blk-core.c +++ b/block/blk-core.c | |||
@@ -3405,6 +3405,9 @@ int blk_pre_runtime_suspend(struct request_queue *q) | |||
3405 | { | 3405 | { |
3406 | int ret = 0; | 3406 | int ret = 0; |
3407 | 3407 | ||
3408 | if (!q->dev) | ||
3409 | return ret; | ||
3410 | |||
3408 | spin_lock_irq(q->queue_lock); | 3411 | spin_lock_irq(q->queue_lock); |
3409 | if (q->nr_pending) { | 3412 | if (q->nr_pending) { |
3410 | ret = -EBUSY; | 3413 | ret = -EBUSY; |
@@ -3432,6 +3435,9 @@ EXPORT_SYMBOL(blk_pre_runtime_suspend); | |||
3432 | */ | 3435 | */ |
3433 | void blk_post_runtime_suspend(struct request_queue *q, int err) | 3436 | void blk_post_runtime_suspend(struct request_queue *q, int err) |
3434 | { | 3437 | { |
3438 | if (!q->dev) | ||
3439 | return; | ||
3440 | |||
3435 | spin_lock_irq(q->queue_lock); | 3441 | spin_lock_irq(q->queue_lock); |
3436 | if (!err) { | 3442 | if (!err) { |
3437 | q->rpm_status = RPM_SUSPENDED; | 3443 | q->rpm_status = RPM_SUSPENDED; |
@@ -3456,6 +3462,9 @@ EXPORT_SYMBOL(blk_post_runtime_suspend); | |||
3456 | */ | 3462 | */ |
3457 | void blk_pre_runtime_resume(struct request_queue *q) | 3463 | void blk_pre_runtime_resume(struct request_queue *q) |
3458 | { | 3464 | { |
3465 | if (!q->dev) | ||
3466 | return; | ||
3467 | |||
3459 | spin_lock_irq(q->queue_lock); | 3468 | spin_lock_irq(q->queue_lock); |
3460 | q->rpm_status = RPM_RESUMING; | 3469 | q->rpm_status = RPM_RESUMING; |
3461 | spin_unlock_irq(q->queue_lock); | 3470 | spin_unlock_irq(q->queue_lock); |
@@ -3478,6 +3487,9 @@ EXPORT_SYMBOL(blk_pre_runtime_resume); | |||
3478 | */ | 3487 | */ |
3479 | void blk_post_runtime_resume(struct request_queue *q, int err) | 3488 | void blk_post_runtime_resume(struct request_queue *q, int err) |
3480 | { | 3489 | { |
3490 | if (!q->dev) | ||
3491 | return; | ||
3492 | |||
3481 | spin_lock_irq(q->queue_lock); | 3493 | spin_lock_irq(q->queue_lock); |
3482 | if (!err) { | 3494 | if (!err) { |
3483 | q->rpm_status = RPM_ACTIVE; | 3495 | q->rpm_status = RPM_ACTIVE; |