diff options
Diffstat (limited to 'drivers/mtd/mtdcore.c')
-rw-r--r-- | drivers/mtd/mtdcore.c | 6 |
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); | |||
1077 | * until the request succeeds or until the allocation size falls below | 1077 | * until the request succeeds or until the allocation size falls below |
1078 | * the system page size. This attempts to make sure it does not adversely | 1078 | * the system page size. This attempts to make sure it does not adversely |
1079 | * impact system performance, so when allocating more than one page, we | 1079 | * impact system performance, so when allocating more than one page, we |
1080 | * ask the memory allocator to avoid re-trying. | 1080 | * ask the memory allocator to avoid re-trying, swapping, writing back |
1081 | * or performing I/O. | ||
1081 | * | 1082 | * |
1082 | * Note, this function also makes sure that the allocated buffer is aligned to | 1083 | * Note, this function also makes sure that the allocated buffer is aligned to |
1083 | * the MTD device's min. I/O unit, i.e. the "mtd->writesize" value. | 1084 | * the MTD device's min. I/O unit, i.e. the "mtd->writesize" value. |
@@ -1091,7 +1092,8 @@ EXPORT_SYMBOL_GPL(mtd_writev); | |||
1091 | */ | 1092 | */ |
1092 | void *mtd_kmalloc_up_to(const struct mtd_info *mtd, size_t *size) | 1093 | void *mtd_kmalloc_up_to(const struct mtd_info *mtd, size_t *size) |
1093 | { | 1094 | { |
1094 | gfp_t flags = __GFP_NOWARN | __GFP_WAIT | __GFP_NORETRY; | 1095 | gfp_t flags = __GFP_NOWARN | __GFP_WAIT | |
1096 | __GFP_NORETRY | __GFP_NO_KSWAPD; | ||
1095 | size_t min_alloc = max_t(size_t, mtd->writesize, PAGE_SIZE); | 1097 | size_t min_alloc = max_t(size_t, mtd->writesize, PAGE_SIZE); |
1096 | void *kbuf; | 1098 | void *kbuf; |
1097 | 1099 | ||