]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
kclient: add missing ceph dentry init
authorYehuda Sadeh <yehuda@hq.newdream.net>
Wed, 1 Apr 2009 17:12:03 +0000 (10:12 -0700)
committerYehuda Sadeh <yehuda@hq.newdream.net>
Wed, 1 Apr 2009 17:12:03 +0000 (10:12 -0700)
src/kernel/dir.c
src/kernel/inode.c

index d70564b8fbfdbf64ffd65026079713af1723c89a..4b90ffaaa7fcc2a4302e82bfa4139035fff5a890 100644 (file)
@@ -849,6 +849,8 @@ void ceph_dentry_lru_touch(struct dentry *dn)
 {
        struct ceph_dentry_info *di = ceph_dentry(dn);
        struct ceph_mds_client *mdsc;
+       dout(30, "dentry_lru_touch %p %p\t%.*s\n",
+                       di, dn, dn->d_name.len, dn->d_name.name);
 
        if (di) {
                mdsc = &ceph_client(dn->d_sb)->mdsc;
@@ -863,6 +865,8 @@ void ceph_dentry_lru_del(struct dentry *dn)
        struct ceph_dentry_info *di = ceph_dentry(dn);
        struct ceph_mds_client *mdsc;
 
+       dout(30, "dentry_lru_del %p %p\t%.*s\n",
+                       di, dn, dn->d_name.len, dn->d_name.name);
        if (di) {
                mdsc = &ceph_client(dn->d_sb)->mdsc;
                spin_lock(&mdsc->dentry_lru_lock);
index 1eba5000a2542da0b7289a7fefd5fd6260b39ac5..1faa0001ef31612e8b571dbaa2d28581436ed5ae 100644 (file)
@@ -768,6 +768,8 @@ static struct dentry *splice_dentry(struct dentry *dn, struct inode *in,
                ceph_init_dentry(dn);
                __init_ceph_dentry(dn, 0);
        } else {
+               if (!ceph_dentry(dn))
+                       __init_ceph_dentry(dn, 0);
                dout(10, "dn %p attached to %p ino %llx.%llx\n",
                     dn, dn->d_inode, ceph_vinop(dn->d_inode));
        }