[PATCH 22/25] fs/fbatch: drop_caches invalidate_bh_lrus() not lru_add_drain_all()
From: Hugh Dickins
Date: Mon Aug 24 2026 - 10:57:23 EST
drop_caches has no good reason to lru_add_drain_all(), now that the
per-cpu fbatch references are gone; but it may have good reason to
do the invalidate_bh_lrus() part of it.
Signed-off-by: Hugh Dickins <hughd@xxxxxxxxxx>
---
fs/drop_caches.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/drop_caches.c b/fs/drop_caches.c
index 49f56a598ecb..054af78e6a2e 100644
--- a/fs/drop_caches.c
+++ b/fs/drop_caches.c
@@ -10,7 +10,7 @@
#include <linux/writeback.h>
#include <linux/sysctl.h>
#include <linux/gfp.h>
-#include <linux/swap.h>
+#include <linux/buffer_head.h>
#include "internal.h"
/* A global variable is a bit ugly, but it keeps the code simple */
@@ -60,7 +60,7 @@ static int drop_caches_sysctl_handler(const struct ctl_table *table, int write,
static int stfu;
if (sysctl_drop_caches & 1) {
- lru_add_drain_all();
+ invalidate_bh_lrus();
iterate_supers(drop_pagecache_sb, NULL);
count_vm_event(DROP_PAGECACHE);
}
--
2.51.0