lkml.org 
[lkml]   [2010]   [Nov]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [patch 13/28] fs: dcache scale d_unhashed
From
On Tue, Nov 16, 2010 at 6:09 AM, Nick Piggin <npiggin@kernel.dk> 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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2010-11-19 20:43    [W:0.305 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site