From: Chas Williams - CONTRACTOR Date: Thu, 7 Jan 2010 22:35:20 +0000 (-0500) Subject: LINUX/: ifdef for GFP_NOFS conditionals X-Git-Tag: openafs-devel-1_5_69~42 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=f72207d8c48bfa087bd677e3966e82952c25fd83;p=packages%2Fo%2Fopenafs.git LINUX/: ifdef for GFP_NOFS conditionals Remove the conditionals in the linux 2.6 tree for GFP_NOFS. This feature has existed since the beginning of the 2.6 tree. This makes the code easier to read. Change-Id: Ib42af012c57912f72effb836743ab8f1ddc30486 Reviewed-on: http://gerrit.openafs.org/1077 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- diff --git a/src/afs/LINUX/osi_alloc.c b/src/afs/LINUX/osi_alloc.c index 3de0767b6..b586d7b7d 100644 --- a/src/afs/LINUX/osi_alloc.c +++ b/src/afs/LINUX/osi_alloc.c @@ -79,13 +79,7 @@ linux_alloc(unsigned int asize, int drop_glock) /* if we can use kmalloc use it to allocate the required memory. */ while (!new && max_retry) { if (asize <= MAX_KMALLOC_SIZE) { - new = (void *)(unsigned long)kmalloc(asize, -#ifdef GFP_NOFS - GFP_NOFS -#else - GFP_KERNEL -#endif - ); + new = (void *)(unsigned long)kmalloc(asize, GFP_NOFS); if (new) /* piggy back alloc type */ new = (void *)(KM_TYPE | (unsigned long)new); } else { diff --git a/src/afs/LINUX/osi_cred.c b/src/afs/LINUX/osi_cred.c index f402a5746..3a0988b0b 100644 --- a/src/afs/LINUX/osi_cred.c +++ b/src/afs/LINUX/osi_cred.c @@ -34,9 +34,6 @@ crget(void) { cred_t *tmp; -#if !defined(GFP_NOFS) -#define GFP_NOFS GFP_KERNEL -#endif tmp = kmalloc(sizeof(cred_t), GFP_NOFS); memset(tmp, 0, sizeof(cred_t)); if (!tmp)