]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - include/linux/dcache.h
vfs: Lazily remove mounts on unlinked files and directories. v2
[karo-tx-linux.git] / include / linux / dcache.h
index 844a1ef387e46da67ba4575b1603c1a7a17ac95a..17948b49f3d52951914f4d1f3d4acdaf93183846 100644 (file)
@@ -254,7 +254,8 @@ extern void d_prune_aliases(struct inode *);
 
 /* test whether we have any submounts in a subdir tree */
 extern int have_submounts(struct dentry *);
-extern int check_submounts_and_drop(struct dentry *);
+extern void detach_submounts(struct dentry *dentry);
+extern void shrink_submounts_and_drop(struct dentry *);
 
 /*
  * This adds the entry to the hash queues.
@@ -395,4 +396,8 @@ static inline bool d_mountpoint(const struct dentry *dentry)
 
 extern int sysctl_vfs_cache_pressure;
 
+static inline unsigned long vfs_pressure_ratio(unsigned long val)
+{
+       return mult_frac(val, sysctl_vfs_cache_pressure, 100);
+}
 #endif /* __LINUX_DCACHE_H */