mtd: mtdchar: retry large buffer allocations
authorGrant Erickson <[email protected]>
Fri, 8 Apr 2011 15:51:33 +0000 (08:51 -0700)
committerDavid Woodhouse <[email protected]>
Wed, 25 May 2011 01:00:45 +0000 (02:00 +0100)
commit3e45cf5e85a4f344fc4c8c901ac057a2402db125
treebf395c31e85b6c0f9544aa52820d78d9ba8da8e7
parent33b53716bc4b3ff3da2bc41581226424443f9d5a
mtd: mtdchar: retry large buffer allocations

Replace direct call to kmalloc for a potentially large, contiguous
buffer allocation with one to mtd_kmalloc_up_to which helps ensure the
operation can succeed under low-memory, highly- fragmented situations
albeit somewhat more slowly.

Signed-off-by: Grant Erickson <[email protected]>
Tested-by: Ben Gardiner <[email protected]>
Tested-by: Stefano Babic <[email protected]>
Signed-off-by: Artem Bityutskiy <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
drivers/mtd/mtdchar.c