Skip to content

Commit

Permalink
gfs2_atomic_open(): simplify the use of finish_no_open()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Al Viro committed Nov 19, 2014
1 parent 81295ce commit 845409b
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions fs/gfs2/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 845409b

Please sign in to comment.