X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=block%2Felevator.c;h=9b72dc7c8a5c98dcde87dc0d7e42d9a56f447776;hb=7c440e7990ea22c0c374c59a5fbd79b0579d1517;hp=bc7baeec0d102014c07ec7308d54dbc2161e4ba9;hpb=b197ba3c70638a3a2ae39296781912f26ac0f991;p=linux-2.6-omap-h63xx.git diff --git a/block/elevator.c b/block/elevator.c index bc7baeec0d1..9b72dc7c8a5 100644 --- a/block/elevator.c +++ b/block/elevator.c @@ -765,7 +765,8 @@ void elv_unregister(struct elevator_type *e) read_lock(&tasklist_lock); do_each_thread(g, p) { task_lock(p); - e->ops.trim(p->io_context); + if (p->io_context) + e->ops.trim(p->io_context); task_unlock(p); } while_each_thread(g, p); read_unlock(&tasklist_lock);