From: Anders Kaseorg Date: Tue, 22 Feb 2011 23:18:17 +0000 (-0500) Subject: Linux: Reduce key_alloc flags confusion X-Git-Tag: debian/1.6.0.pre3-1~5^2^2~55 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=b5bc969a564f33d68de0802c3f59c4e1df357eb3;p=packages%2Fo%2Fopenafs.git 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 --- 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