Skip to content

Commit

Permalink
Explain clearly why kmalloc() can't use __GFP_HIGHMEM.
Browse files Browse the repository at this point in the history
Fix the wishy-washy comment to clearly explain why kmalloc() can't
use the __GFP_HIGHMEM zone modifier.

Signed-off-by: Robert P. J. Day <[email protected]>
Signed-off-by: Adrian Bunk <[email protected]>
  • Loading branch information
Robert P. J. Day authored and AdrianBunk committed Oct 19, 2007
1 parent 3a4fa0a commit 8518609
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mm/nommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ EXPORT_SYMBOL(vfree);
void *__vmalloc(unsigned long size, gfp_t gfp_mask, pgprot_t prot)
{
/*
* kmalloc doesn't like __GFP_HIGHMEM for some reason
* You can't specify __GFP_HIGHMEM with kmalloc() since kmalloc()
* returns only a logical address.
*/
return kmalloc(size, (gfp_mask | __GFP_COMP) & ~__GFP_HIGHMEM);
}
Expand Down

0 comments on commit 8518609

Please sign in to comment.