> Trying again after some useful comments from Balbir.
> Note: the change to prune_dcache looks quite different now.
>
> NeilBrown
>
<snip>
> tmp = dentry_unused.prev;
> + if (unlikely(sb)) {
> + /* Try to find a dentry for this sb, but don't try
> + * too hard, if they aren't near the tail they will
> + * be moved down again soon
> + */
> + int skip = count;
> + while (skip &&
> + tmp != &dentry_unused &&
> + list_entry(tmp, struct dentry, d_lru)->d_sb != sb) {
> + skip--;
> + tmp = tmp->prev;
> + }
> + }
This code looks very similar to the first pass in dcache_shrink_sb().
I would prefer if we could re-use that code here, but that would
require creating a helper function by splitting the function.
Looks like a good solution to me.
Regards,
Balbir
-
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]