diff options
Diffstat (limited to 'mm/vmscan.c')
-rw-r--r-- | mm/vmscan.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c index 261a56ee11b6..6c30a8c59795 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c | |||
@@ -268,9 +268,7 @@ static inline int is_page_cache_freeable(struct page *page) | |||
268 | 268 | ||
269 | static int may_write_to_queue(struct backing_dev_info *bdi) | 269 | static int may_write_to_queue(struct backing_dev_info *bdi) |
270 | { | 270 | { |
271 | if (current_is_kswapd()) | 271 | if (current->flags & PF_SWAPWRITE) |
272 | return 1; | ||
273 | if (current_is_pdflush()) /* This is unlikely, but why not... */ | ||
274 | return 1; | 272 | return 1; |
275 | if (!bdi_write_congested(bdi)) | 273 | if (!bdi_write_congested(bdi)) |
276 | return 1; | 274 | return 1; |
@@ -1299,7 +1297,7 @@ static int kswapd(void *p) | |||
1299 | * us from recursively trying to free more memory as we're | 1297 | * us from recursively trying to free more memory as we're |
1300 | * trying to free the first piece of memory in the first place). | 1298 | * trying to free the first piece of memory in the first place). |
1301 | */ | 1299 | */ |
1302 | tsk->flags |= PF_MEMALLOC|PF_KSWAPD; | 1300 | tsk->flags |= PF_MEMALLOC | PF_SWAPWRITE | PF_KSWAPD; |
1303 | 1301 | ||
1304 | order = 0; | 1302 | order = 0; |
1305 | for ( ; ; ) { | 1303 | for ( ; ; ) { |