Skip to contentSkip to conversation

use __GFP_NOKILL in grab_cache_page

PATCH In review William Lee Irwin III 1 participant 1 message Sep 26, 2002

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 13/13 use __GFP_NOKILL in grab_cache_page

grab_cache_page() may be failed instead of killing innocent tasks.

mm/filemap.c +1 -1
diff -urN linux-2.5.33/mm/filemap.c linux-2.5.33-mm5/mm/filemap.c
@@ -1278,7 +1278,7 @@
 	page = find_lock_page(mapping, index);
 	if (!page) {
 		if (!*cached_page) {
-			*cached_page = page_cache_alloc(mapping);
+			*cached_page = alloc_page(mapping->gfp_mask | __GFP_NOKILL);
 			if (!*cached_page)
 				return NULL;
 		}

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/