svn commit: linux-cifs-client r76 - in
branches/linux-converged-for-old-kernels/fs/cifs: .
sfrench at samba.org
sfrench at samba.org
Mon Aug 21 20:37:36 GMT 2006
Author: sfrench
Date: 2006-08-21 20:37:35 +0000 (Mon, 21 Aug 2006)
New Revision: 76
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=76
Log:
another 2.4 cifs build fix
Modified:
branches/linux-converged-for-old-kernels/fs/cifs/transport.c
Changeset:
Modified: branches/linux-converged-for-old-kernels/fs/cifs/transport.c
===================================================================
--- branches/linux-converged-for-old-kernels/fs/cifs/transport.c 2006-08-21 17:08:04 UTC (rev 75)
+++ branches/linux-converged-for-old-kernels/fs/cifs/transport.c 2006-08-21 20:37:35 UTC (rev 76)
@@ -27,13 +27,19 @@
#include <linux/delay.h>
#include <asm/uaccess.h>
#include <asm/processor.h>
-#include <linux/mempool.h>
#include "cifspdu.h"
#include "cifsglob.h"
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0)
+#include <linux/mempool.h>
+#else
+extern kmem_cache_t *cifs_mid_cachep;
+#endif
#include "cifsproto.h"
#include "cifs_debug.h"
-
+
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0)
extern mempool_t *cifs_mid_poolp;
+#endif
extern kmem_cache_t *cifs_oplock_cachep;
static struct mid_q_entry *
@@ -49,9 +55,16 @@
cERROR(1, ("Null TCP session in AllocMidQEntry"));
return NULL;
}
-
+
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0)
temp = (struct mid_q_entry *) mempool_alloc(cifs_mid_poolp,
SLAB_KERNEL | SLAB_NOFS);
+#else
+ temp = (struct mid_q_entry *) kmem_cache_alloc(cifs_mid_cachep,
+ SLAB_KERNEL);
+
+#endif
+
if (temp == NULL)
return temp;
else {
@@ -106,7 +119,11 @@
}
}
#endif
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0)
mempool_free(midEntry, cifs_mid_poolp);
+#else
+ kmem_cache_free(cifs_mid_cachep, midEntry);
+#endif
}
struct oplock_q_entry *
More information about the samba-cvs
mailing list