All of lore.kernel.org
 help / color / mirror / Atom feed
From: Henry C Chang <henry_c_chang@tcloudcomputing.com>
To: ceph-devel@vger.kernel.org
Subject: [PATCH] ceph: fix d_subdirs ordering problem
Date: Tue, 1 Jun 2010 18:47:07 +0800	[thread overview]
Message-ID: <AANLkTikAPg1pVfpnH_BSQFyQn2BzUNiGB3tVC2104Ts1@mail.gmail.com> (raw)

We misused list_move_tail() to order the dentry in d_subdirs.
This will screw up the d_subdirs order.

This bug can be reliably reproduced by:
1. mount ceph fs.
2. on ceph fs, git clone git://ceph.newdream.net/git/ceph.git
3. Run autogen.sh in ceph directory.
(Note: Errors only occur at the first time you run autogen.sh.)

Signed-off-by: Henry C Chang <henry_c_chang@tcloudcomputing.com>
---
 inode.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/inode.c b/inode.c
index a81b8b6..72903a1 100644
--- a/inode.c
+++ b/inode.c
@@ -827,7 +827,7 @@ static void ceph_set_dentry_offset(struct dentry *dn)

        spin_lock(&dcache_lock);
        spin_lock(&dn->d_lock);
-       list_move_tail(&dir->d_subdirs, &dn->d_u.d_child);
+       list_move(&dn->d_u.d_child, &dir->d_subdirs);
        dout("set_dentry_offset %p %lld (%p %p)\n", dn, di->offset,
             dn->d_u.d_child.prev, dn->d_u.d_child.next);
        spin_unlock(&dn->d_lock);
--
1.6.5.2

             reply	other threads:[~2010-06-01 10:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-01 10:47 Henry C Chang [this message]
2010-06-01 18:45 ` [PATCH] ceph: fix d_subdirs ordering problem Sage Weil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTikAPg1pVfpnH_BSQFyQn2BzUNiGB3tVC2104Ts1@mail.gmail.com \
    --to=henry_c_chang@tcloudcomputing.com \
    --cc=ceph-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.