From b5bc969a564f33d68de0802c3f59c4e1df357eb3 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Tue, 22 Feb 2011 18:18:17 -0500 Subject: [PATCH] Linux: Reduce key_alloc flags confusion KEY_ALLOC_IN_QUOTA should be 0, not 1. Fortunately this was overridden by the earlier correct definition in osi_compat.h. Signed-off-by: Anders Kaseorg Reviewed-on: http://gerrit.openafs.org/4033 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear (cherry picked from commit c576ca12b6618d2a121b29562aa70532b4cf65a9) Change-Id: If22e75b52792991f9eae5e27ef9b06dcfb73aae3 Reviewed-on: http://gerrit.openafs.org/4069 Tested-by: BuildBot Reviewed-by: Derrick Brashear --- src/afs/LINUX/osi_compat.h | 9 --------- src/afs/LINUX/osi_groups.c | 5 ++++- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/src/afs/LINUX/osi_compat.h b/src/afs/LINUX/osi_compat.h index db90c07a9..0b0ffe87a 100644 --- a/src/afs/LINUX/osi_compat.h +++ b/src/afs/LINUX/osi_compat.h @@ -199,15 +199,6 @@ afs_linux_cred_is_current(afs_ucred_t *cred) } #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 - #ifndef HAVE_LINUX_PAGE_OFFSET static inline loff_t page_offset(struct page *pp) diff --git a/src/afs/LINUX/osi_groups.c b/src/afs/LINUX/osi_groups.c index cd769e878..9b97103e7 100644 --- a/src/afs/LINUX/osi_groups.c +++ b/src/afs/LINUX/osi_groups.c @@ -35,7 +35,10 @@ # include # 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 -- 2.39.5