Merge branch 'for-linus' of git://git.kernel.dk/data/git/linux-2.6-block
[linux-2.6-block.git] / fs / dlm / midcomms.c
index c9b1c3d535f4c0e3a1904db462c0b5827090700f..f8c69dda16a080af8e960f2111772bed46d2c8c2 100644 (file)
@@ -2,7 +2,7 @@
 *******************************************************************************
 **
 **  Copyright (C) Sistina Software, Inc.  1997-2003  All rights reserved.
-**  Copyright (C) 2004-2005 Red Hat, Inc.  All rights reserved.
+**  Copyright (C) 2004-2007 Red Hat, Inc.  All rights reserved.
 **
 **  This copyrighted material is made available to anyone wishing to use,
 **  modify, copy, or redistribute it subject to the terms and conditions
@@ -27,7 +27,6 @@
 #include "dlm_internal.h"
 #include "lowcomms.h"
 #include "config.h"
-#include "rcom.h"
 #include "lock.h"
 #include "midcomms.h"
 
@@ -82,7 +81,7 @@ int dlm_process_incoming_buffer(int nodeid, const void *base,
                if (msglen < sizeof(struct dlm_header))
                        break;
                err = -E2BIG;
-               if (msglen > dlm_config.buffer_size) {
+               if (msglen > dlm_config.ci_buffer_size) {
                        log_print("message size %d from %d too big, buf len %d",
                                  msglen, nodeid, len);
                        break;
@@ -103,7 +102,7 @@ int dlm_process_incoming_buffer(int nodeid, const void *base,
 
                if (msglen > sizeof(__tmp) &&
                    msg == (struct dlm_header *) __tmp) {
-                       msg = kmalloc(dlm_config.buffer_size, GFP_KERNEL);
+                       msg = kmalloc(dlm_config.ci_buffer_size, GFP_KERNEL);
                        if (msg == NULL)
                                return ret;
                }
@@ -117,19 +116,7 @@ int dlm_process_incoming_buffer(int nodeid, const void *base,
                offset &= (limit - 1);
                len -= msglen;
 
-               switch (msg->h_cmd) {
-               case DLM_MSG:
-                       dlm_receive_message(msg, nodeid, 0);
-                       break;
-
-               case DLM_RCOM:
-                       dlm_receive_rcom(msg, nodeid);
-                       break;
-
-               default:
-                       log_print("unknown msg type %x from %u: %u %u %u %u",
-                                 msg->h_cmd, nodeid, msglen, len, offset, ret);
-               }
+               dlm_receive_buffer(msg, nodeid);
        }
 
        if (msg != (struct dlm_header *) __tmp)