On Wed, 24 May 2006 11:24:12 +1000 David Chinner wrote:
> Index: 2.6.x-xfs-new/fs/dcache.c
> ===================================================================
> --- 2.6.x-xfs-new.orig/fs/dcache.c 2006-05-15 16:24:44.212207654 +1000
> +++ 2.6.x-xfs-new/fs/dcache.c 2006-05-16 14:00:46.327462206 +1000
> @@ -114,6 +113,38 @@ static void dentry_iput(struct dentry *
> }
> }
>
> +static void
> +dentry_lru_add(struct dentry *dentry)
> +{
> + list_add(&dentry->d_lru, &dentry->d_sb->s_dentry_lru);
> + dentry_stat.nr_unused++;
> +}
> +
> +static void
> +dentry_lru_add_tail(struct dentry *dentry)
> +{
> + list_add_tail(&dentry->d_lru, &dentry->d_sb->s_dentry_lru);
> + dentry_stat.nr_unused++;
> +}
> +
> +static void
> +dentry_lru_del(struct dentry *dentry)
> +{
> + if (!list_empty(&dentry->d_lru)) {
> + list_del(&dentry->d_lru);
> + dentry_stat.nr_unused--;
> + }
> +}
> +
> +static void
> +dentry_lru_del_init(struct dentry *dentry)
> +{
> + if (likely(!list_empty(&dentry->d_lru))) {
> + list_del_init(&dentry->d_lru);
> + dentry_stat.nr_unused--;
> + }
> +}
> +
> /*
> * This is dput
> *
Please use regular kernel coding style for functions:
don't put qualifiers and names on separate lines.
> @@ -377,6 +399,48 @@ static inline void prune_one_dentry(stru
> spin_lock(&dcache_lock);
> }
>
> +/*
> + * Shrink the dentry LRU on æ given superblock.
on ? given superblock ?
> + */
> +static void
> +__shrink_dcache_sb(struct super_block *sb, int *count, int flags)
> +{
---
~Randy
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]