All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH] ocfs2: Fix checking of return value of	new_inode()
Date: Wed, 22 Oct 2008 13:52:48 +0200	[thread overview]
Message-ID: <20081022115248.GF13868@duck.suse.cz> (raw)
In-Reply-To: <20081021203503.GE2871@mail.oracle.com>

On Tue 21-10-08 13:35:03, Joel Becker wrote:
> On Mon, Oct 20, 2008 at 07:23:53PM +0200, Jan Kara wrote:
> > new_inode() does not return ERR_PTR() but NULL in case of failure. Correct
> > checking of the return value.
> > 
> > Signed-off-by: Jan Kara <jack@suse.cz>
> Signed-off-by: Joel Becker <joel.becker@oracle.com>
> 
> Another upstream candidate.
  Yep. Mark, will you pick it up or should I send you the patch directly?

										Honza
> 
> > ---
> >  fs/ocfs2/namei.c |    4 ++--
> >  1 files changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c
> > index d5d808f..0372ef0 100644
> > --- a/fs/ocfs2/namei.c
> > +++ b/fs/ocfs2/namei.c
> > @@ -382,8 +382,8 @@ static int ocfs2_mknod_locked(struct ocfs2_super *osb,
> >  	}
> >  
> >  	inode = new_inode(dir->i_sb);
> > -	if (IS_ERR(inode)) {
> > -		status = PTR_ERR(inode);
> > +	if (!inode) {
> > +		status = -ENOMEM;
> >  		mlog(ML_ERROR, "new_inode failed!\n");
> >  		goto leave;
> >  	}
> > -- 
> > 1.5.2.4
> > 
> > 
> > _______________________________________________
> > Ocfs2-devel mailing list
> > Ocfs2-devel at oss.oracle.com
> > http://oss.oracle.com/mailman/listinfo/ocfs2-devel
> 
> -- 
> 
> "Well-timed silence hath more eloquence than speech."  
>          - Martin Fraquhar Tupper
> 
> Joel Becker
> Principal Software Developer
> Oracle
> E-mail: joel.becker at oracle.com
> Phone: (650) 506-8127
-- 
Jan Kara <jack@suse.cz>
SUSE Labs, CR

  reply	other threads:[~2008-10-22 11:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-20 17:23 [Ocfs2-devel] [PATCH] ocfs2: Fix checking of return value of new_inode() Jan Kara
2008-10-21 20:35 ` Joel Becker
2008-10-22 11:52   ` Jan Kara [this message]
2008-10-24 21:42   ` Joel Becker

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=20081022115248.GF13868@duck.suse.cz \
    --to=jack@suse.cz \
    --cc=ocfs2-devel@oss.oracle.com \
    /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.