]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
fix dput in the wrong place
authorYehuda Sadeh-Weinraub <yehuda@yehuda.infit.com>
Sun, 13 Jan 2008 19:07:24 +0000 (21:07 +0200)
committerYehuda Sadeh-Weinraub <yehuda@yehuda.infit.com>
Sun, 13 Jan 2008 19:07:24 +0000 (21:07 +0200)
src/kernel/dir.c

index 39427313738d1dc8c0819925e25e6179f9e7e24c..bb5f255d9936c1aa08b7c6983e46423cc0f78b52 100644 (file)
@@ -262,7 +262,7 @@ static int ceph_fill_trace(struct super_block *sb, struct ceph_mds_reply_info *p
 {
        int err = 0;
        struct qstr dname;
-       struct dentry *dn, *parent;
+       struct dentry *dn, *parent = NULL;
        struct inode *in;
        int i = 0;
 
@@ -292,6 +292,7 @@ static int ceph_fill_trace(struct super_block *sb, struct ceph_mds_reply_info *p
        }
 
        for (++i; i<prinfo->trace_nr; i++) {
+               dput(parent);
                parent = dn;
 
                dname.name = prinfo->trace_dname[i];
@@ -300,8 +301,6 @@ static int ceph_fill_trace(struct super_block *sb, struct ceph_mds_reply_info *p
 
                dn = d_lookup(parent, &dname);
 
-               dput(parent);
-
                dout(30, "calling d_lookup on parent=%p name=%s returned %p\n", parent, dname.name, dn);
 
                if (!dn) {
@@ -344,6 +343,7 @@ static int ceph_fill_trace(struct super_block *sb, struct ceph_mds_reply_info *p
        
        }
 
+       dput(parent);
        dput(dn);
        
        if (lastinode) {