From 376027f2a3888ef3dec73ee41f85d90e51162d78 Mon Sep 17 00:00:00 2001 From: André Fabian Silva Delgado Date: Tue, 8 Sep 2015 11:24:16 -0300 Subject: Add TuxOnIce support --- fs/drop_caches.c | 7 +++++++ fs/super.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'fs') diff --git a/fs/drop_caches.c b/fs/drop_caches.c index 5718cb9f7..8289cb195 100644 --- a/fs/drop_caches.c +++ b/fs/drop_caches.c @@ -8,6 +8,7 @@ #include #include #include +#include #include "internal.h" /* A global variable is a bit ugly, but it keeps the code simple */ @@ -37,6 +38,12 @@ static void drop_pagecache_sb(struct super_block *sb, void *unused) iput(toput_inode); } +/* For TuxOnIce */ +void drop_pagecache(void) +{ + iterate_supers(drop_pagecache_sb, NULL); +} + int drop_caches_sysctl_handler(struct ctl_table *table, int write, void __user *buffer, size_t *length, loff_t *ppos) { diff --git a/fs/super.c b/fs/super.c index b61372354..143edf4f1 100644 --- a/fs/super.c +++ b/fs/super.c @@ -36,7 +36,7 @@ #include "internal.h" -static LIST_HEAD(super_blocks); +LIST_HEAD(super_blocks); static DEFINE_SPINLOCK(sb_lock); static char *sb_writers_name[SB_FREEZE_LEVELS] = { -- cgit v1.2.3-54-g00ecf