From 000b7e88985e9f2724715e3cde997d6b2033b663 Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Wed, 23 May 2012 12:16:21 +0200 Subject: [PATCH] --- yaml --- r: 309283 b: refs/heads/master c: ff26eaadf4d914e397872b99885d45756104e9ae h: refs/heads/master i: 309281: c74f7ebd28db9a47647f1fb43319065b0be51e8c 309279: a2f79ef5c8a7f13ed102f34033bed5a9619a422e v: v3 --- [refs] | 2 +- trunk/block/blk-throttle.c | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 88e90ec67121..7ffac3bac9a0 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0b7877d4eea3f93e3dd941999522bbd8c538cb53 +refs/heads/master: ff26eaadf4d914e397872b99885d45756104e9ae diff --git a/trunk/block/blk-throttle.c b/trunk/block/blk-throttle.c index 14dedecfc7e8..5b0659512047 100644 --- a/trunk/block/blk-throttle.c +++ b/trunk/block/blk-throttle.c @@ -219,6 +219,7 @@ static void tg_stats_alloc_fn(struct work_struct *work) static void throtl_pd_init(struct blkcg_gq *blkg) { struct throtl_grp *tg = blkg_to_tg(blkg); + unsigned long flags; RB_CLEAR_NODE(&tg->rb_node); bio_list_init(&tg->bio_lists[0]); @@ -235,19 +236,20 @@ static void throtl_pd_init(struct blkcg_gq *blkg) * but percpu allocator can't be called from IO path. Queue tg on * tg_stats_alloc_list and allocate from work item. */ - spin_lock(&tg_stats_alloc_lock); + spin_lock_irqsave(&tg_stats_alloc_lock, flags); list_add(&tg->stats_alloc_node, &tg_stats_alloc_list); queue_delayed_work(system_nrt_wq, &tg_stats_alloc_work, 0); - spin_unlock(&tg_stats_alloc_lock); + spin_unlock_irqrestore(&tg_stats_alloc_lock, flags); } static void throtl_pd_exit(struct blkcg_gq *blkg) { struct throtl_grp *tg = blkg_to_tg(blkg); + unsigned long flags; - spin_lock(&tg_stats_alloc_lock); + spin_lock_irqsave(&tg_stats_alloc_lock, flags); list_del_init(&tg->stats_alloc_node); - spin_unlock(&tg_stats_alloc_lock); + spin_unlock_irqrestore(&tg_stats_alloc_lock, flags); free_percpu(tg->stats_cpu); }