summaryrefslogtreecommitdiff
path: root/fs/fuse/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/fuse/dir.c')
-rw-r--r--fs/fuse/dir.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
index 77982fdbcf27..8ef8134e1cd5 100644
--- a/fs/fuse/dir.c
+++ b/fs/fuse/dir.c
@@ -189,6 +189,27 @@ static void fuse_dentry_tree_work(struct work_struct *work)
secs_to_jiffies(inval_wq));
}
+void fuse_epoch_work(struct work_struct *work)
+{
+ struct fuse_conn *fc = container_of(work, struct fuse_conn,
+ epoch_work);
+ struct fuse_mount *fm;
+ struct inode *inode;
+
+ down_read(&fc->killsb);
+
+ inode = fuse_ilookup(fc, FUSE_ROOT_ID, &fm);
+ iput(inode);
+
+ if (fm) {
+ /* Remove all possible active references to cached inodes */
+ shrink_dcache_sb(fm->sb);
+ } else
+ pr_warn("Failed to get root inode");
+
+ up_read(&fc->killsb);
+}
+
void fuse_dentry_tree_init(void)
{
int i;