diff options
| -rw-r--r-- | block/blk-cgroup.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index 1fa2654db0a6..e7dbbaf5fb3e 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c | |||
| @@ -147,16 +147,16 @@ blkiocg_weight_write(struct cgroup *cgroup, struct cftype *cftype, u64 val) | |||
| 147 | return -EINVAL; | 147 | return -EINVAL; |
| 148 | 148 | ||
| 149 | blkcg = cgroup_to_blkio_cgroup(cgroup); | 149 | blkcg = cgroup_to_blkio_cgroup(cgroup); |
| 150 | spin_lock(&blkio_list_lock); | ||
| 150 | spin_lock_irq(&blkcg->lock); | 151 | spin_lock_irq(&blkcg->lock); |
| 151 | blkcg->weight = (unsigned int)val; | 152 | blkcg->weight = (unsigned int)val; |
| 152 | hlist_for_each_entry(blkg, n, &blkcg->blkg_list, blkcg_node) { | 153 | hlist_for_each_entry(blkg, n, &blkcg->blkg_list, blkcg_node) { |
| 153 | spin_lock(&blkio_list_lock); | ||
| 154 | list_for_each_entry(blkiop, &blkio_list, list) | 154 | list_for_each_entry(blkiop, &blkio_list, list) |
| 155 | blkiop->ops.blkio_update_group_weight_fn(blkg, | 155 | blkiop->ops.blkio_update_group_weight_fn(blkg, |
| 156 | blkcg->weight); | 156 | blkcg->weight); |
| 157 | spin_unlock(&blkio_list_lock); | ||
| 158 | } | 157 | } |
| 159 | spin_unlock_irq(&blkcg->lock); | 158 | spin_unlock_irq(&blkcg->lock); |
| 159 | spin_unlock(&blkio_list_lock); | ||
| 160 | return 0; | 160 | return 0; |
| 161 | } | 161 | } |
| 162 | 162 | ||
