From: Al Viro <viro@ZenIV.linux.org.uk>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH 3/3] gfs2_atomic_open(): simplify the use of finish_no_open()
Date: Wed, 19 Nov 2014 19:35:58 +0000 [thread overview]
Message-ID: <20141119193558.GB7996@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20141119193404.GY7996@ZenIV.linux.org.uk>
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>
---
fs/gfs2/inode.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c
index ce0cf9a..6e29174 100644
--- a/fs/gfs2/inode.c
+++ b/fs/gfs2/inode.c
@@ -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;
}
--
1.7.10.4
prev parent reply other threads:[~2014-11-19 19:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-19 19:34 [Cluster-devel] [gfs2 patches in vfs.git] Al Viro
2014-11-19 19:34 ` [Cluster-devel] [PATCH 1/3] gfs2: bugger off early if O_CREAT open finds a directory Al Viro
2014-11-19 20:33 ` Bob Peterson
2014-11-19 20:42 ` Al Viro
2014-11-19 20:46 ` Bob Peterson
2014-11-19 19:35 ` [Cluster-devel] [PATCH 2/3] gfs2_create_inode(): don't bother with d_splice_alias() Al Viro
2014-11-19 19:35 ` Al Viro [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141119193558.GB7996@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.