mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-11 08:18:47 +00:00
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: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
81295ce635
commit
845409b49b
@ -1249,11 +1249,8 @@ static int gfs2_atomic_open(struct inode *dir, struct dentry *dentry,
|
|||||||
if (d != NULL)
|
if (d != NULL)
|
||||||
dentry = d;
|
dentry = d;
|
||||||
if (dentry->d_inode) {
|
if (dentry->d_inode) {
|
||||||
if (!(*opened & FILE_OPENED)) {
|
if (!(*opened & FILE_OPENED))
|
||||||
if (d == NULL)
|
return finish_no_open(file, d);
|
||||||
dget(dentry);
|
|
||||||
return finish_no_open(file, dentry);
|
|
||||||
}
|
|
||||||
dput(d);
|
dput(d);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user