.. | .. |
---|
9 | 9 | #include <linux/writeback.h> |
---|
10 | 10 | #include <linux/sysctl.h> |
---|
11 | 11 | #include <linux/gfp.h> |
---|
| 12 | +#include <linux/swap.h> |
---|
12 | 13 | #include "internal.h" |
---|
13 | 14 | |
---|
14 | 15 | /* A global variable is a bit ugly, but it keeps the code simple */ |
---|
.. | .. |
---|
47 | 48 | } |
---|
48 | 49 | |
---|
49 | 50 | int drop_caches_sysctl_handler(struct ctl_table *table, int write, |
---|
50 | | - void __user *buffer, size_t *length, loff_t *ppos) |
---|
| 51 | + void *buffer, size_t *length, loff_t *ppos) |
---|
51 | 52 | { |
---|
52 | 53 | int ret; |
---|
53 | 54 | |
---|
.. | .. |
---|
58 | 59 | static int stfu; |
---|
59 | 60 | |
---|
60 | 61 | if (sysctl_drop_caches & 1) { |
---|
| 62 | + lru_add_drain_all(); |
---|
61 | 63 | iterate_supers(drop_pagecache_sb, NULL); |
---|
62 | 64 | count_vm_event(DROP_PAGECACHE); |
---|
63 | 65 | } |
---|