]> Git Repo - linux.git/commit
vfs: use kmalloc() to allocate fdmem if possible
authorChangli Gao <[email protected]>
Wed, 11 Aug 2010 01:01:35 +0000 (18:01 -0700)
committerLinus Torvalds <[email protected]>
Wed, 11 Aug 2010 15:59:02 +0000 (08:59 -0700)
commita892e2d7dcdfa6c76e60c50a8c7385c65587a2a6
treeaf32ff520eaa8766039fc71e3f9759fe73e727ba
parent06b1e104b7ea1bf5145643de5a3fce28b831ca4c
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.

[[email protected]: use __GFP_NOWARN, uninline alloc_fdmem() and free_fdmem()]
Signed-off-by: Changli Gao <[email protected]>
Cc: Alexander Viro <[email protected]>
Cc: Jiri Slaby <[email protected]>
Cc: "Paul E. McKenney" <[email protected]>
Cc: Alexey Dobriyan <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Avi Kivity <[email protected]>
Cc: Tetsuo Handa <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
fs/file.c
This page took 0.053703 seconds and 4 git commands to generate.