X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=blobdiff_plain;f=block%2Felevator.c;h=9b72dc7c8a5c98dcde87dc0d7e42d9a56f447776;hp=d00b283f31d21fdb5256754b75336e1005fb7eed;hb=9c724357f432df5ddc83a62c8168414a604cd420;hpb=4854c7b27f0975a2b629f35ea3996d2968eb7c4f diff --git a/block/elevator.c b/block/elevator.c index d00b283f31d2..9b72dc7c8a5c 100644 --- a/block/elevator.c +++ b/block/elevator.c @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include @@ -766,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);