Search Linux Wireless

[PATCH 06/13] Add compatibility call for kmem_cache_destroy()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On commit 133d205a, kmem_cache_destroy() was made returning void, while
older
kernel could return an error value.

Signed-off-by: Arnaud Lacombe <lacombar@xxxxxxxxx>
---
 compat-2.6.19.h |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/compat-2.6.19.h b/compat-2.6.19.h
index 7967390..017044c 100644
--- a/compat-2.6.19.h
+++ b/compat-2.6.19.h
@@ -7,6 +7,19 @@
 /* Compat work for 2.6.19 */
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19))

+#include <linux/slab.h>
+
+static inline int
+compat_kmem_cache_destroy(struct kmem_cache *cachep)
+{
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19))
+	return kmem_cache_destroy(cachep);
+#else
+	kmem_cache_destroy(cachep);
+	return 0;
+#endif
+}
+
 #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)) */

 #endif /* LINUX_26_19_COMPAT_H */
-- 
1.6.3.3.385.g60647.dirty


--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux