]> err.no Git - linux-2.6/blobdiff - block/elevator.c
[GFS2] Spelling sentinal -> sentinel
[linux-2.6] / block / elevator.c
index d00b283f31d21fdb5256754b75336e1005fb7eed..9b72dc7c8a5c98dcde87dc0d7e42d9a56f447776 100644 (file)
@@ -27,7 +27,6 @@
 #include <linux/blkdev.h>
 #include <linux/elevator.h>
 #include <linux/bio.h>
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/slab.h>
 #include <linux/init.h>
@@ -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);