提交 78f71eff 编写于 作者: M Miklos Szeredi 提交者: Al Viro

vfs: do_dentry_open(): don't put filp

Move put_filp() out to __dentry_open(), the only caller now.
Signed-off-by: NMiklos Szeredi <mszeredi@suse.cz>
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
上级 90ad1a8e
......@@ -747,7 +747,6 @@ static struct file *do_dentry_open(struct dentry *dentry, struct vfsmount *mnt,
f->f_path.dentry = NULL;
f->f_path.mnt = NULL;
cleanup_file:
put_filp(f);
dput(dentry);
mntput(mnt);
return ERR_PTR(error);
......@@ -765,6 +764,8 @@ static struct file *__dentry_open(struct dentry *dentry, struct vfsmount *mnt,
fput(res);
res = ERR_PTR(error);
}
} else {
put_filp(f);
}
return res;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册