]> err.no Git - linux-2.6/blobdiff - fs/dcache.c
[PATCH] Allow raw_notifier callouts to unregister themselves
[linux-2.6] / fs / dcache.c
index 59dbc92c2079b88054c6f5852b5c7bd04cbd187c..313b54b2b8f2cb0f074fd122f7b929f67b60cee8 100644 (file)
@@ -687,46 +687,6 @@ void shrink_dcache_parent(struct dentry * parent)
                prune_dcache(found, parent->d_sb);
 }
 
-/**
- * shrink_dcache_anon - further prune the cache
- * @head: head of d_hash list of dentries to prune
- *
- * Prune the dentries that are anonymous
- *
- * parsing d_hash list does not hlist_for_each_entry_rcu() as it
- * done under dcache_lock.
- *
- */
-void shrink_dcache_anon(struct super_block *sb)
-{
-       struct hlist_node *lp;
-       struct hlist_head *head = &sb->s_anon;
-       int found;
-       do {
-               found = 0;
-               spin_lock(&dcache_lock);
-               hlist_for_each(lp, head) {
-                       struct dentry *this = hlist_entry(lp, struct dentry, d_hash);
-                       if (!list_empty(&this->d_lru)) {
-                               dentry_stat.nr_unused--;
-                               list_del_init(&this->d_lru);
-                       }
-
-                       /* 
-                        * move only zero ref count dentries to the end 
-                        * of the unused list for prune_dcache
-                        */
-                       if (!atomic_read(&this->d_count)) {
-                               list_add_tail(&this->d_lru, &dentry_unused);
-                               dentry_stat.nr_unused++;
-                               found++;
-                       }
-               }
-               spin_unlock(&dcache_lock);
-               prune_dcache(found, sb);
-       } while(found);
-}
-
 /*
  * Scan `nr' dentries and return the number which remain.
  *