]> git.hungrycats.org Git - linux/commitdiff
[PATCH] kNFSd: A couple of possible incorrect calls to dput....
authorNeil Brown <neilb@cse.unsw.edu.au>
Fri, 11 Oct 2002 12:30:49 +0000 (05:30 -0700)
committerLinus Torvalds <torvalds@home.transmeta.com>
Fri, 11 Oct 2002 12:30:49 +0000 (05:30 -0700)
Thanks to Hirokazu Takahashi <taka@valinux.co.jp>

fs/exportfs/expfs.c

index 4414b3c9315caafea43a588d39a187b1ae532530..9a66fe94dc3f1a8c018897196e4f85827ead6cc6 100644 (file)
@@ -183,12 +183,12 @@ find_exported_dentry(struct super_block *sb, void *obj, void *parent,
                        err = CALL(nops,get_name)(ppd, nbuf, pd);
                        if (err) {
                                dput(ppd);
+                               dput(pd);
                                if (err == -ENOENT)
                                        /* some race between get_parent and
                                         * get_name?  just try again
                                         */
                                        continue;
-                               dput(pd);
                                break;
                        }
                        dprintk("find_exported_dentry: found name: %s\n", nbuf);
@@ -254,6 +254,7 @@ find_exported_dentry(struct super_block *sb, void *obj, void *parent,
                return result;
        /* one last try of the aliases.. */
        spin_lock(&dcache_lock);
+       toput = NULL;
        head = &result->d_inode->i_dentry;
        list_for_each(le, head) {
                struct dentry *dentry = list_entry(le, struct dentry, d_alias);