projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag 'linux-kselftest-4.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel...
[firefly-linux-kernel-4.4.55.git]
/
drivers
/
md
/
dm.c
diff --git
a/drivers/md/dm.c
b/drivers/md/dm.c
index f331d888e7f5a52cd5a2ada7498a5051bd8e38ca..ab37ae114e943c20c161f88b8c2a739206bfafab 100644
(file)
--- a/
drivers/md/dm.c
+++ b/
drivers/md/dm.c
@@
-1067,13
+1067,10
@@
static void rq_end_stats(struct mapped_device *md, struct request *orig)
*/
static void rq_completed(struct mapped_device *md, int rw, bool run_queue)
{
*/
static void rq_completed(struct mapped_device *md, int rw, bool run_queue)
{
- int nr_requests_pending;
-
atomic_dec(&md->pending[rw]);
/* nudge anyone waiting on suspend queue */
atomic_dec(&md->pending[rw]);
/* nudge anyone waiting on suspend queue */
- nr_requests_pending = md_in_flight(md);
- if (!nr_requests_pending)
+ if (!md_in_flight(md))
wake_up(&md->wait);
/*
wake_up(&md->wait);
/*
@@
-1085,8
+1082,7
@@
static void rq_completed(struct mapped_device *md, int rw, bool run_queue)
if (run_queue) {
if (md->queue->mq_ops)
blk_mq_run_hw_queues(md->queue, true);
if (run_queue) {
if (md->queue->mq_ops)
blk_mq_run_hw_queues(md->queue, true);
- else if (!nr_requests_pending ||
- (nr_requests_pending >= md->queue->nr_congestion_on))
+ else
blk_run_queue_async(md->queue);
}
blk_run_queue_async(md->queue);
}
@@
-2281,8
+2277,6
@@
static void dm_init_old_md_queue(struct mapped_device *md)
static void cleanup_mapped_device(struct mapped_device *md)
{
static void cleanup_mapped_device(struct mapped_device *md)
{
- cleanup_srcu_struct(&md->io_barrier);
-
if (md->wq)
destroy_workqueue(md->wq);
if (md->kworker_task)
if (md->wq)
destroy_workqueue(md->wq);
if (md->kworker_task)
@@
-2294,6
+2288,8
@@
static void cleanup_mapped_device(struct mapped_device *md)
if (md->bs)
bioset_free(md->bs);
if (md->bs)
bioset_free(md->bs);
+ cleanup_srcu_struct(&md->io_barrier);
+
if (md->disk) {
spin_lock(&_minor_lock);
md->disk->private_data = NULL;
if (md->disk) {
spin_lock(&_minor_lock);
md->disk->private_data = NULL;