]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Linux: Reduce key_alloc flags confusion
authorAnders Kaseorg <andersk@mit.edu>
Tue, 22 Feb 2011 23:18:17 +0000 (18:18 -0500)
committerRuss Allbery <rra@debian.org>
Tue, 1 Mar 2011 00:09:47 +0000 (16:09 -0800)
KEY_ALLOC_IN_QUOTA should be 0, not 1.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-on: http://gerrit.openafs.org/4033
(cherry picked from commit dfcd3fcae5e2d2c22f9692c60f0b4e5858c25c9e)

Change-Id: I910e87f147a5fc5022cacb8dee799503ebf5476b
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
(cherry picked from commit 4cf4381af5130f7c7845a6a24c55a3623383581a)

src/afs/LINUX/osi_compat.h
src/afs/sysincludes.h

index 37465fa806e772de1284fe5633fbcc465a01e02b..7b9652469346f9a9e89d23edbcb8b26312200661 100644 (file)
@@ -135,15 +135,6 @@ init_once_func(void * foo) {
 #else
 #define KALLOC_TYPE GFP_KERNEL
 #endif
-
-#ifdef LINUX_KEYRING_SUPPORT
-# ifndef KEY_ALLOC_NOT_IN_QUOTA
-#  define KEY_ALLOC_NOT_IN_QUOTA 1
-# endif
-# ifndef KEY_ALLOC_IN_QUOTA
-#  define KEY_ALLOC_IN_QUOTA 0
-# endif
-#endif
 #endif
 
 static inline int
index 07c5add2db88f8af73ead3a4f41366f693e7a691..9b9508749fd473d1d54ee9a86f63f9d28fcc1268 100644 (file)
 #include <linux/key-type.h>
 #endif
 #ifndef KEY_ALLOC_IN_QUOTA
-#define KEY_ALLOC_IN_QUOTA 1
+/* Before these flags were added in Linux commit v2.6.18-rc1~816,
+ * key_alloc just took a boolean not_in_quota */
+#define KEY_ALLOC_IN_QUOTA 0
+#define KEY_ALLOC_NOT_IN_QUOTA 1
 #endif
 #endif
 #endif