Commit 7fffa27d authored by Neil Brown's avatar Neil Brown Committed by Linus Torvalds

[PATCH] kNFSd: A couple of possible incorrect calls to dput....

Thanks to Hirokazu Takahashi <taka@valinux.co.jp>
parent 9b2ae623
...@@ -183,12 +183,12 @@ find_exported_dentry(struct super_block *sb, void *obj, void *parent, ...@@ -183,12 +183,12 @@ find_exported_dentry(struct super_block *sb, void *obj, void *parent,
err = CALL(nops,get_name)(ppd, nbuf, pd); err = CALL(nops,get_name)(ppd, nbuf, pd);
if (err) { if (err) {
dput(ppd); dput(ppd);
dput(pd);
if (err == -ENOENT) if (err == -ENOENT)
/* some race between get_parent and /* some race between get_parent and
* get_name? just try again * get_name? just try again
*/ */
continue; continue;
dput(pd);
break; break;
} }
dprintk("find_exported_dentry: found name: %s\n", nbuf); dprintk("find_exported_dentry: found name: %s\n", nbuf);
...@@ -254,6 +254,7 @@ find_exported_dentry(struct super_block *sb, void *obj, void *parent, ...@@ -254,6 +254,7 @@ find_exported_dentry(struct super_block *sb, void *obj, void *parent,
return result; return result;
/* one last try of the aliases.. */ /* one last try of the aliases.. */
spin_lock(&dcache_lock); spin_lock(&dcache_lock);
toput = NULL;
head = &result->d_inode->i_dentry; head = &result->d_inode->i_dentry;
list_for_each(le, head) { list_for_each(le, head) {
struct dentry *dentry = list_entry(le, struct dentry, d_alias); struct dentry *dentry = list_entry(le, struct dentry, d_alias);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment