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 <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
Chas Williams - CONTRACTOR 2010-01-07 17:35:20 -05:00 committed by Derrick Brashear
parent fcce9a4727
commit f72207d8c4
2 changed files with 1 additions and 10 deletions

View File

@ -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 {

View File

@ -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)