hc
2024-05-10 748e4f3d702def1a4bff191e0cf93b6a05340f01
kernel/fs/drop_caches.c
....@@ -9,6 +9,7 @@
99 #include <linux/writeback.h>
1010 #include <linux/sysctl.h>
1111 #include <linux/gfp.h>
12
+#include <linux/swap.h>
1213 #include "internal.h"
1314
1415 /* A global variable is a bit ugly, but it keeps the code simple */
....@@ -47,7 +48,7 @@
4748 }
4849
4950 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)
5152 {
5253 int ret;
5354
....@@ -58,6 +59,7 @@
5859 static int stfu;
5960
6061 if (sysctl_drop_caches & 1) {
62
+ lru_add_drain_all();
6163 iterate_supers(drop_pagecache_sb, NULL);
6264 count_vm_event(DROP_PAGECACHE);
6365 }