IS_ERR() already implies unlikely(), so it can be omitted here.
Signed-off-by: Tobias Klauser <[email protected]>
---
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",
--
1.7.0.4
On Thu, 9 Dec 2010, Tobias Klauser wrote:
> IS_ERR() already implies unlikely(), so it can be omitted here.
>
> Signed-off-by: Tobias Klauser <[email protected]>
> ---
> 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.
Thanks!
-Lukas
On Thu, 9 Dec 2010, Tobias Klauser wrote:
> On 2010-12-09 at 16:53:38 +0100, Lukas Czerner <[email protected]> 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 <[email protected]>
> > > ---
> > > 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
>
Ok, my apologize. I saw only this one on the ext4 list.
-Lukas
On 2010-12-09 at 16:53:38 +0100, Lukas Czerner <[email protected]> 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 <[email protected]>
> > ---
> > 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
On Thu 09-12-10 15:39:34, Tobias Klauser wrote:
> IS_ERR() already implies unlikely(), so it can be omitted here.
Thanks. Merged.
Honza
>
> Signed-off-by: Tobias Klauser <[email protected]>
> ---
> 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",
> --
> 1.7.0.4
>
--
Jan Kara <[email protected]>
SUSE Labs, CR