There is no page cache for the procfs, so do not scan the inodes in procfs. Signed-off-by: Huang Shijie --- fs/drop_caches.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fs/drop_caches.c b/fs/drop_caches.c index 49f56a598ecb..1959090089af 100644 --- a/fs/drop_caches.c +++ b/fs/drop_caches.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include @@ -20,6 +21,9 @@ static void drop_pagecache_sb(struct super_block *sb, void *unused) { struct inode *inode, *toput_inode = NULL; + if (sb->s_magic == PROC_SUPER_MAGIC) + return; + spin_lock(&sb->s_inode_list_lock); list_for_each_entry(inode, &sb->s_inodes, i_sb_list) { spin_lock(&inode->i_lock); -- 2.53.0