Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 173016
b: refs/heads/master
c: bb729bc
h: refs/heads/master
v: v3
  • Loading branch information
Jens Axboe committed Dec 6, 2009
1 parent d0e9b85 commit eb72c55
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 846954b0a32f4ae953e082eabd178e7a98dd2efd
refs/heads/master: bb729bc98c0f3e6a898d8730df3e2830bf68751a
10 changes: 8 additions & 2 deletions trunk/block/cfq-iosched.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ struct cfq_data {

/* List of cfq groups being managed on this device*/
struct hlist_head cfqg_list;
struct rcu_head rcu;
};

static struct cfq_group *cfq_get_next_cfqg(struct cfq_data *cfqd);
Expand Down Expand Up @@ -3601,6 +3602,11 @@ static void cfq_put_async_queues(struct cfq_data *cfqd)
cfq_put_queue(cfqd->async_idle_cfqq);
}

static void cfq_cfqd_free(struct rcu_head *head)
{
kfree(container_of(head, struct cfq_data, rcu));
}

static void cfq_exit_queue(struct elevator_queue *e)
{
struct cfq_data *cfqd = e->elevator_data;
Expand Down Expand Up @@ -3630,8 +3636,7 @@ static void cfq_exit_queue(struct elevator_queue *e)
cfq_shutdown_timer_wq(cfqd);

/* Wait for cfqg->blkg->key accessors to exit their grace periods. */
synchronize_rcu();
kfree(cfqd);
call_rcu(&cfqd->rcu, cfq_cfqd_free);
}

static void *cfq_init_queue(struct request_queue *q)
Expand Down Expand Up @@ -3706,6 +3711,7 @@ static void *cfq_init_queue(struct request_queue *q)
cfqd->cfq_group_isolation = 0;
cfqd->hw_tag = -1;
cfqd->last_end_sync_rq = jiffies;
INIT_RCU_HEAD(&cfqd->rcu);
return cfqd;
}

Expand Down

0 comments on commit eb72c55

Please sign in to comment.