linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tobias Klauser <tklauser@distanz.ch>
To: Lukas Czerner <lczerner@redhat.com>
Cc: Jan Kara <jack@suse.cz>,
	Andrew Morton <akpm@linux-foundation.org>,
	Andreas Dilger <adilger.kernel@dilger.ca>,
	linux-ext4@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] ext3: Remove redundant unlikely()
Date: Thu, 9 Dec 2010 17:01:17 +0100	[thread overview]
Message-ID: <20101209160117.GG10190@distanz.ch> (raw)
In-Reply-To: <alpine.LFD.2.00.1012091652200.2731@dhcp-lab-213.englab.brq.redhat.com>

On 2010-12-09 at 16:53:38 +0100, Lukas Czerner <lczerner@redhat.com> wrote:
> On Thu, 9 Dec 2010, Tobias Klauser wrote:
> 
> > IS_ERR() already implies unlikely(), so it can be omitted here.
> > 
> > Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
> > ---
> >  fs/ext3/namei.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > diff --git a/fs/ext3/namei.c b/fs/ext3/namei.c
> > index bce9dce..268f776 100644
> > --- a/fs/ext3/namei.c
> > +++ b/fs/ext3/namei.c
> > @@ -1047,7 +1047,7 @@ static struct dentry *ext3_lookup(struct inode * dir, struct dentry *dentry, str
> >  			return ERR_PTR(-EIO);
> >  		}
> >  		inode = ext3_iget(dir->i_sb, ino);
> > -		if (unlikely(IS_ERR(inode))) {
> > +		if (IS_ERR(inode)) {
> >  			if (PTR_ERR(inode) == -ESTALE) {
> >  				ext3_error(dir->i_sb, __func__,
> >  						"deleted inode referenced: %lu",
> > 
> 
> Good catch, but I guess the same thing may be done for ext2/4.

I did so actually [0], [1]. Unfortunately I didn't submit the three patches as a
series.

[0] http://lists.openwall.net/linux-ext4/2010/12/09/6
[1] http://lists.openwall.net/linux-ext4/2010/12/09/5

Cheers
Tobias

  reply	other threads:[~2010-12-09 16:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-09 14:39 [PATCH] ext3: Remove redundant unlikely() Tobias Klauser
2010-12-09 15:53 ` Lukas Czerner
2010-12-09 16:01   ` Tobias Klauser [this message]
2010-12-09 16:05     ` Lukas Czerner
2011-01-06 15:44 ` Jan Kara

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=20101209160117.GG10190@distanz.ch \
    --to=tklauser@distanz.ch \
    --cc=adilger.kernel@dilger.ca \
    --cc=akpm@linux-foundation.org \
    --cc=jack@suse.cz \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=lczerner@redhat.com \
    --cc=linux-ext4@vger.kernel.org \
    /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).