OSDN Git Service

GFS2: Fall back to vmalloc if kmalloc fails for dir hash tables
authorBob Peterson <rpeterso@redhat.com>
Thu, 30 May 2013 13:48:56 +0000 (09:48 -0400)
committerSteven Whitehouse <swhiteho@redhat.com>
Mon, 3 Jun 2013 15:39:44 +0000 (16:39 +0100)
commite8830d8856e3ad61067dd46c05438b0d75a0441a
tree33756e349db97fffa55aac324135c7aff914f70b
parent2b3dcf35810ff02ad0e785527a25c1b13bf82b19
GFS2: Fall back to vmalloc if kmalloc fails for dir hash tables

This version has one more correction: the vmalloc calls are replaced
by __vmalloc calls to preserve the GFP_NOFS flag.

When GFS2's directory management code allocates buffers for a
directory hash table, if it can't get the memory it needs, it
currently gives a bad return code. Rather than giving an error,
this patch allows it to use virtual memory rather than kernel
memory for the hash table. This should make it possible for
directories to function properly, even when kernel memory becomes
very fragmented.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
fs/gfs2/dir.c