Re: [patch 13/28] fs: dcache scale d_unhashed

From: Tim Pepper
Date: Fri Nov 19 2010 - 14:41:16 EST


On Tue, Nov 16, 2010 at 6:09 AM, Nick Piggin <npiggin@xxxxxxxxx> wrote:

> @@ -1797,7 +1822,10 @@ static void d_move_locked(struct dentry
>        /*
>         * XXXX: do we really need to take target->d_lock?
>         */
> -       if (target < dentry) {
> +       if (d_ancestor(dentry, target)) {
> +               spin_lock(&dentry->d_lock);
> +               spin_lock_nested(&target->d_lock, DENTRY_D_LOCK_NESTED);
> +       } else if (d_ancestor(target, dentry) || target < dentry) {
>                spin_lock(&target->d_lock);
>                spin_lock_nested(&dentry->d_lock, DENTRY_D_LOCK_NESTED);
>        } else {

This is the first hunk out of the series where I feel like reading the
new code makes me say "ugh".
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/