summaryrefslogtreecommitdiff
path: root/drivers/mtd/mtdcore.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-12-15 23:56:43 +0900
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-12-15 23:56:43 +0900
commit326b06a8a9b09d6d9a276fd550b6b6bb138e9a47 (patch)
treeb9bdcb0bd635b91258cec09c981af2c5dcc0f683 /drivers/mtd/mtdcore.c
parent92b2e81d6f95bcee386abac4c4389f5b950f7bb9 (diff)
parent9bffb1fb7c22c96d51d4ba06e2e023dd568a5872 (diff)
downloadlinux-3.10-326b06a8a9b09d6d9a276fd550b6b6bb138e9a47.tar.gz
linux-3.10-326b06a8a9b09d6d9a276fd550b6b6bb138e9a47.tar.bz2
linux-3.10-326b06a8a9b09d6d9a276fd550b6b6bb138e9a47.zip
Merge remote-tracking branch 'asoc/topic/core' into asoc-next
Diffstat (limited to 'drivers/mtd/mtdcore.c')
-rw-r--r--drivers/mtd/mtdcore.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c
index 374c46dff7d..ec794a72975 100644
--- a/drivers/mtd/mtdcore.c
+++ b/drivers/mtd/mtdcore.c
@@ -1077,7 +1077,8 @@ EXPORT_SYMBOL_GPL(mtd_writev);
* until the request succeeds or until the allocation size falls below
* the system page size. This attempts to make sure it does not adversely
* impact system performance, so when allocating more than one page, we
- * ask the memory allocator to avoid re-trying.
+ * ask the memory allocator to avoid re-trying, swapping, writing back
+ * or performing I/O.
*
* Note, this function also makes sure that the allocated buffer is aligned to
* the MTD device's min. I/O unit, i.e. the "mtd->writesize" value.
@@ -1091,7 +1092,8 @@ EXPORT_SYMBOL_GPL(mtd_writev);
*/
void *mtd_kmalloc_up_to(const struct mtd_info *mtd, size_t *size)
{
- gfp_t flags = __GFP_NOWARN | __GFP_WAIT | __GFP_NORETRY;
+ gfp_t flags = __GFP_NOWARN | __GFP_WAIT |
+ __GFP_NORETRY | __GFP_NO_KSWAPD;
size_t min_alloc = max_t(size_t, mtd->writesize, PAGE_SIZE);
void *kbuf;