Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 88223
b: refs/heads/master
c: 4faa3c8
h: refs/heads/master
i:
  88221: d6903ec
  88219: 44f354f
  88215: f202a7c
  88207: 9a44836
  88191: 4dc3125
v: v3
  • Loading branch information
Fabio Checconi authored and Jens Axboe committed Apr 10, 2008
1 parent 22774a4 commit 4e3fc94
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 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: 8191ecd1d14c6914c660dfa007154860a7908857
refs/heads/master: 4faa3c8150c1d4f7b38d962eda7851083e218e3f
9 changes: 6 additions & 3 deletions trunk/block/cfq-iosched.c
Original file line number Diff line number Diff line change
Expand Up @@ -1214,6 +1214,8 @@ static void cfq_exit_cfqq(struct cfq_data *cfqd, struct cfq_queue *cfqq)
static void __cfq_exit_single_io_context(struct cfq_data *cfqd,
struct cfq_io_context *cic)
{
struct io_context *ioc = cic->ioc;

list_del_init(&cic->queue_list);

/*
Expand All @@ -1223,6 +1225,9 @@ static void __cfq_exit_single_io_context(struct cfq_data *cfqd,
cic->dead_key = (unsigned long) cic->key;
cic->key = NULL;

if (ioc->ioc_data == cic)
rcu_assign_pointer(ioc->ioc_data, NULL);

if (cic->cfqq[ASYNC]) {
cfq_exit_cfqq(cfqd, cic->cfqq[ASYNC]);
cic->cfqq[ASYNC] = NULL;
Expand Down Expand Up @@ -1255,7 +1260,6 @@ static void cfq_exit_single_io_context(struct io_context *ioc,
*/
static void cfq_exit_io_context(struct io_context *ioc)
{
rcu_assign_pointer(ioc->ioc_data, NULL);
call_for_each_cic(ioc, cfq_exit_single_io_context);
}

Expand Down Expand Up @@ -1478,8 +1482,7 @@ cfq_drop_dead_cic(struct cfq_data *cfqd, struct io_context *ioc,

spin_lock_irqsave(&ioc->lock, flags);

if (ioc->ioc_data == cic)
rcu_assign_pointer(ioc->ioc_data, NULL);
BUG_ON(ioc->ioc_data == cic);

radix_tree_delete(&ioc->radix_root, (unsigned long) cfqd);
hlist_del_rcu(&cic->cic_list);
Expand Down

0 comments on commit 4e3fc94

Please sign in to comment.