Whamcloud - gitweb
- fixed some warnings in the DLM
[fs/lustre-release.git] / lustre / ptlrpc / events.c
index 5cf37fb..16ddff1 100644 (file)
 
 #define EXPORT_SYMTAB
 
-#include <linux/config.h>
 #include <linux/module.h>
-#include <linux/kernel.h>
 
 #define DEBUG_SUBSYSTEM S_RPC
 
-#include <linux/obd_support.h>
-#include <linux/obd_class.h>
 #include <linux/lustre_net.h>
 
 ptl_handle_eq_t request_out_eq, 
@@ -50,8 +46,10 @@ static int request_out_callback(ptl_event_t *ev, void *data)
         ENTRY;
 
         if (ev->type == PTL_EVENT_SENT) {
+                spin_lock(&req->rq_client->cli_ha_mgr->mgr_lock);
                 list_del(&req->rq_list);
                 list_add(&req->rq_list, &cl->cli_sent_head);
+                spin_unlock(&req->rq_client->cli_ha_mgr->mgr_lock);
         } else { 
                 // XXX make sure we understand all events, including ACK's
                 CERROR("Unknown event %d\n", ev->type); 
@@ -89,7 +87,7 @@ static int reply_in_callback(ptl_event_t *ev, void *data)
         ENTRY;
 
         if (ev->type == PTL_EVENT_PUT) {
-                rpc->rq_repbuf = ev->mem_desc.start + ev->offset;
+                rpc->rq_repmsg = ev->mem_desc.start + ev->offset;
                 barrier();
                 wake_up_interruptible(&rpc->rq_wait_for_rep);
         } else {