lkml.org 
[lkml]   [2017]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] don't forget to call pd_online_fn when activate policy
Date
From: z00354408 <z00354408@notesmail.huawei.com>

Signed-off-by: z00354408 <z00354408@notesmail.huawei.com>
---
block/blk-cgroup.c | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
index 8ba0af7..0dd9e76 100644
--- a/block/blk-cgroup.c
+++ b/block/blk-cgroup.c
@@ -1254,6 +1254,12 @@ int blkcg_activate_policy(struct request_queue *q,
pd->plid = pol->plid;
if (pol->pd_init_fn)
pol->pd_init_fn(pd);
+
+ if (pol->pd_online_fn) {
+ spin_lock(blkg->blkcg->lock);
+ pol->pd_online_fn(pd);
+ spin_unlock(blkg->blkcg->lock);
+ }
}

__set_bit(pol->plid, q->blkcg_pols);
--
1.8.3.1
\
 
 \ /
  Last update: 2017-03-08 05:15    [W:0.085 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site