提交 845409b4 编写于 作者: A Al Viro

gfs2_atomic_open(): simplify the use of finish_no_open()

In ->atomic_open(inode, dentry, file, opened) calling finish_no_open(file, NULL)
is equivalent to dget(dentry); return finish_no_open(file, dentry);

No need to open-code that...
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
上级 81295ce6
......@@ -1249,11 +1249,8 @@ static int gfs2_atomic_open(struct inode *dir, struct dentry *dentry,
if (d != NULL)
dentry = d;
if (dentry->d_inode) {
if (!(*opened & FILE_OPENED)) {
if (d == NULL)
dget(dentry);
return finish_no_open(file, dentry);
}
if (!(*opened & FILE_OPENED))
return finish_no_open(file, d);
dput(d);
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册