From: Steven Whitehouse <swhiteho@redhat.com>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: viro@ZenIV.linux.org.uk, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org, mszeredi@suse.cz,
stable@vger.kernel.org
Subject: Re: [PATCH 06/11] gfs2: d_splice_alias() cant return error
Date: Mon, 16 Sep 2013 14:56:28 +0100 [thread overview]
Message-ID: <1379339788.2718.23.camel@menhir> (raw)
In-Reply-To: <20130916133559.GB31733@tucsk.piliscsaba.szeredi.hu>
Hi,
On Mon, 2013-09-16 at 15:35 +0200, Miklos Szeredi wrote:
> On Mon, Sep 16, 2013 at 02:17:49PM +0100, Steven Whitehouse wrote:
> > Hi,
> >
> > On Mon, 2013-09-16 at 14:52 +0200, Miklos Szeredi wrote:
> > > From: Miklos Szeredi <mszeredi@suse.cz>
> > >
> > > unless it was given an IS_ERR(inode), which isn't the case here. So clean
> > > up the unnecessary error handling in gfs2_create_inode().
> > >
> > > This paves the way for real fixes (hence the stable Cc).
> > >
> > That makes send to me:
> >
> > Acked-by: Steven Whitehouse <swhiteho@redhat.com>
> >
> > I can put this in the gfs2 tree if that makes sense to do,
>
> Sure, please do.
>
> Thanks,
> Miklos
>
Ok. I'll add the patches shortly. I need to try and wrap my brain around
patch 8 too,
Steve.
>
> > Steve.
> >
> > > Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
> > > Cc: Steven Whitehouse <swhiteho@redhat.com>
> > > Cc: stable@vger.kernel.org
> > > ---
> > > fs/gfs2/inode.c | 4 +---
> > > 1 file changed, 1 insertion(+), 3 deletions(-)
> > >
> > > diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c
> > > index 64915ee..6d7f976 100644
> > > --- a/fs/gfs2/inode.c
> > > +++ b/fs/gfs2/inode.c
> > > @@ -584,7 +584,7 @@ static int gfs2_create_inode(struct inode *dir, struct dentry *dentry,
> > > if (!IS_ERR(inode)) {
> > > d = d_splice_alias(inode, dentry);
> > > error = 0;
> > > - if (file && !IS_ERR(d)) {
> > > + if (file) {
> > > if (d == NULL)
> > > d = dentry;
> > > if (S_ISREG(inode->i_mode))
> > > @@ -593,8 +593,6 @@ static int gfs2_create_inode(struct inode *dir, struct dentry *dentry,
> > > error = finish_no_open(file, d);
> > > }
> > > gfs2_glock_dq_uninit(ghs);
> > > - if (IS_ERR(d))
> > > - return PTR_ERR(d);
> > > return error;
> > > } else if (error != -ENOENT) {
> > > goto fail_gunlock;
> >
> >
next prev parent reply other threads:[~2013-09-16 13:56 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-16 12:51 [PATCH 00/11] atomic open related fixes Miklos Szeredi
2013-09-16 12:51 ` [PATCH 01/11] vfs: improve i_op->atomic_open() documentation Miklos Szeredi
2013-09-16 12:51 ` [PATCH 02/11] 9p: fix dentry leak in v9fs_vfs_atomic_open_dotl() Miklos Szeredi
2013-09-16 18:19 ` Al Viro
2013-09-16 19:03 ` Miklos Szeredi
2013-09-16 19:50 ` Al Viro
2013-09-16 20:09 ` Miklos Szeredi
2013-09-16 22:02 ` Al Viro
2013-09-16 23:28 ` Al Viro
2013-09-17 10:16 ` Miklos Szeredi
2013-09-17 11:44 ` Al Viro
2013-09-17 15:36 ` Miklos Szeredi
2013-09-17 21:23 ` Al Viro
2013-09-18 8:55 ` Miklos Szeredi
2013-09-16 12:51 ` [PATCH 03/11] 9p: fix O_EXCL in v9fs_vfs_atomic_open() Miklos Szeredi
2013-09-16 12:51 ` [PATCH 04/11] fuse: fix O_EXCL in fuse_atomic_open() Miklos Szeredi
2013-09-16 12:51 ` [PATCH 05/11] cifs: fix filp leak in cifs_atomic_open() Miklos Szeredi
2013-09-18 15:19 ` Steve French
2013-09-18 15:22 ` Al Viro
2013-09-16 12:52 ` [PATCH 06/11] gfs2: d_splice_alias() cant return error Miklos Szeredi
2013-09-16 13:17 ` Steven Whitehouse
2013-09-16 13:35 ` Miklos Szeredi
2013-09-16 13:56 ` Steven Whitehouse [this message]
2013-09-16 12:52 ` [PATCH 07/11] gfs2: pass correct dentry to finish_open() in __gfs2_lookup() Miklos Szeredi
2013-09-16 13:13 ` Steven Whitehouse
2013-09-16 13:34 ` Miklos Szeredi
2013-09-16 13:54 ` Steven Whitehouse
2013-09-16 12:52 ` [PATCH 08/11] gfs2: fix dentry leaks Miklos Szeredi
2013-09-16 12:52 ` [PATCH 09/11] gfs2: set FILE_CREATED Miklos Szeredi
2013-09-16 13:27 ` Steven Whitehouse
2013-09-16 12:52 ` [PATCH 10/11] nfs: " Miklos Szeredi
2013-09-16 12:52 ` [PATCH 11/11] vfs: don't set FILE_CREATED before calling ->atomic_open() Miklos Szeredi
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=1379339788.2718.23.camel@menhir \
--to=swhiteho@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=mszeredi@suse.cz \
--cc=stable@vger.kernel.org \
--cc=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).