mirror of https://gitee.com/openkylin/linux.git
orangefs: double iput() in case of d_make_root() failure
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
This commit is contained in:
parent
16742f2d7c
commit
b05a785109
|
@ -403,10 +403,8 @@ static int pvfs2_fill_sb(struct super_block *sb, void *data, int silent)
|
||||||
|
|
||||||
/* allocates and places root dentry in dcache */
|
/* allocates and places root dentry in dcache */
|
||||||
root_dentry = d_make_root(root);
|
root_dentry = d_make_root(root);
|
||||||
if (!root_dentry) {
|
if (!root_dentry)
|
||||||
iput(root);
|
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
|
||||||
|
|
||||||
sb->s_export_op = &pvfs2_export_ops;
|
sb->s_export_op = &pvfs2_export_ops;
|
||||||
sb->s_root = root_dentry;
|
sb->s_root = root_dentry;
|
||||||
|
|
Loading…
Reference in New Issue