From: Anders Kaseorg Date: Tue, 22 Feb 2011 23:18:17 +0000 (-0500) Subject: Linux: Reduce key_alloc flags confusion X-Git-Tag: upstream/1.8.0_pre1^2~4139 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=c576ca12b6618d2a121b29562aa70532b4cf65a9;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. Change-Id: I91a3b16dca0af182ddc3441437be781e689645a7 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 --- 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