From b61ac21fb08dff5c5f29d5741dd83cffb95a1ffd Mon Sep 17 00:00:00 2001 From: Andrey Markovytch Date: Wed, 3 Feb 2016 08:02:19 +0200 Subject: mm + fs: extends support for cache dropping Exposes drop_pagecache_sb (required by eCryptfs cache wiping) Adds truncate_inode_pages_fill_zero (required by eCryptfs cache wiping), which not only truncates pages but also fills them with 0, so that the cached data can no longer be retrieved. Change-Id: Icfc18a2c8cdc922e71ee17add6459a1355e77ba6 Signed-off-by: Andrey Markovytch [gbroner@codeaurora.org: fix merge conflict] Signed-off-by: Gilad Broner --- include/linux/mm.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/linux') diff --git a/include/linux/mm.h b/include/linux/mm.h index 27d3f27d9cce..a56812f21657 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -29,6 +29,7 @@ struct file_ra_state; struct user_struct; struct writeback_control; struct bdi_writeback; +struct super_block; #ifndef CONFIG_NEED_MULTIPLE_NODES /* Don't use mapnrs, do it properly */ extern unsigned long max_mapnr; @@ -1989,8 +1990,11 @@ vm_unmapped_area(struct vm_unmapped_area_info *info) /* truncate.c */ extern void truncate_inode_pages(struct address_space *, loff_t); +extern void truncate_inode_pages_fill_zero(struct address_space *, loff_t); extern void truncate_inode_pages_range(struct address_space *, loff_t lstart, loff_t lend); +extern void truncate_inode_pages_range_fill_zero(struct address_space *, + loff_t lstart, loff_t lend); extern void truncate_inode_pages_final(struct address_space *); /* generic vm_area_ops exported for stackable file systems */ @@ -2191,6 +2195,8 @@ int drop_caches_sysctl_handler(struct ctl_table *, int, void drop_slab(void); void drop_slab_node(int nid); +void drop_pagecache_sb(struct super_block *sb, void *unused); + #ifndef CONFIG_MMU #define randomize_va_space 0 #else -- cgit v1.2.3