From: Changli Gao Date: Wed, 11 Aug 2010 01:01:35 +0000 (-0700) Subject: vfs: use kmalloc() to allocate fdmem if possible X-Git-Tag: v2.6.36-rc1~249 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a892e2d7dcdfa6c76e60c50a8c7385c65587a2a6;p=pandora-kernel.git vfs: use kmalloc() to allocate fdmem if possible Use kmalloc() to allocate fdmem if possible. vmalloc() is used as a fallback solution for fdmem allocation. A new helper function __free_fdtable() is introduced to reduce the lines of code. A potential bug, vfree() a memory allocated by kmalloc(), is fixed. [akpm@linux-foundation.org: use __GFP_NOWARN, uninline alloc_fdmem() and free_fdmem()] Signed-off-by: Changli Gao Cc: Alexander Viro Cc: Jiri Slaby Cc: "Paul E. McKenney" Cc: Alexey Dobriyan Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Avi Kivity Cc: Tetsuo Handa Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed