hwmon: add TI ads7871 a/d converter driver
[safe/jmp/linux-2.6] / fs / dlm / lock.c
index d0e43a3..031dbe3 100644 (file)
@@ -56,6 +56,7 @@
    L: receive_xxxx_reply()     <-  R: send_xxxx_reply()
 */
 #include <linux/types.h>
+#include <linux/slab.h>
 #include "dlm_internal.h"
 #include <linux/dlm_device.h>
 #include "memory.h"
@@ -320,10 +321,12 @@ static void queue_bast(struct dlm_rsb *r, struct dlm_lkb *lkb, int rqmode)
 {
        lkb->lkb_time_bast = ktime_get();
 
-       if (is_master_copy(lkb))
+       if (is_master_copy(lkb)) {
+               lkb->lkb_bastmode = rqmode; /* printed by debugfs */
                send_bast(r, lkb, rqmode);
-       else
+       } else {
                dlm_add_ast(lkb, AST_BAST, rqmode);
+       }
 }
 
 /*
@@ -730,10 +733,7 @@ static void lkb_add_ordered(struct list_head *new, struct list_head *head,
                if (lkb->lkb_rqmode < mode)
                        break;
 
-       if (!lkb)
-               list_add_tail(new, head);
-       else
-               __list_add(new, lkb->lkb_statequeue.prev, &lkb->lkb_statequeue);
+       __list_add(new, lkb->lkb_statequeue.prev, &lkb->lkb_statequeue);
 }
 
 /* add/remove lkb to rsb's grant/convert/wait queue */