Patchwork fix the outdated comment in ext2_nfs_get_inode()

login
register
mail settings
Submitter Li Haifeng
Date Aug. 30, 2011, 9:53 a.m.
Message ID <CAFNq8R62+5dLbDV3b_rtFgMwTZ2abW+h+tg013L=pij60tTRdw@mail.gmail.com>
Download mbox | patch
Permalink /patch/112234/
State Not Applicable
Headers show

Comments

Li Haifeng - Aug. 30, 2011, 9:53 a.m.
The function iget  referred by the comment is replaced by ext2_iget .
And the ext2_read_inode() is not exist, the ext2_iget is "neater". So
the comment is fixed here.

Signed-off-by: Li Haifeng <omycle@gmail.com>
---
 fs/ext2/super.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

    if (IS_ERR(inode))
Jan Kara - Aug. 30, 2011, 10:35 a.m.
On Tue 30-08-11 17:53:58, Li Haifeng wrote:
> The function iget  referred by the comment is replaced by ext2_iget .
> And the ext2_read_inode() is not exist, the ext2_iget is "neater". So
> the comment is fixed here.
> 
> Signed-off-by: Li Haifeng <omycle@gmail.com>
> ---
>  fs/ext2/super.c |    6 ++----
>  1 files changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/fs/ext2/super.c b/fs/ext2/super.c
> index 1dd62ed..994ced3 100644
> --- a/fs/ext2/super.c
> +++ b/fs/ext2/super.c
> @@ -327,10 +327,8 @@ static struct inode *ext2_nfs_get_inode(struct
> super_block *sb,
>     if (ino > le32_to_cpu(EXT2_SB(sb)->s_es->s_inodes_count))
>         return ERR_PTR(-ESTALE);
> 
> -   /* iget isn't really right if the inode is currently unallocated!!
> -    * ext2_read_inode currently does appropriate checks, but
> -    * it might be "neater" to call ext2_get_inode first and check
> -    * if the inode is valid.....
> +   /*
> +    * ext2_iget isn't really right if the inode is currently unallocated!!
  OK, but we should keep there a note that ext2_iget() does appropriate
checks to handle stale inodes.

									Honza
>      */
>     inode = ext2_iget(sb, ino);
>     if (IS_ERR(inode))
> -- 
> 1.7.4.1
Li Haifeng - Aug. 30, 2011, 11:29 a.m.
Thanks for your point. I will remake this patch.

2011/8/30 Jan Kara <jack@suse.cz>
>
> On Tue 30-08-11 17:53:58, Li Haifeng wrote:
> > The function iget  referred by the comment is replaced by ext2_iget .
> > And the ext2_read_inode() is not exist, the ext2_iget is "neater". So
> > the comment is fixed here.
> >
> > Signed-off-by: Li Haifeng <omycle@gmail.com>
> > ---
> >  fs/ext2/super.c |    6 ++----
> >  1 files changed, 2 insertions(+), 4 deletions(-)
> >
> > diff --git a/fs/ext2/super.c b/fs/ext2/super.c
> > index 1dd62ed..994ced3 100644
> > --- a/fs/ext2/super.c
> > +++ b/fs/ext2/super.c
> > @@ -327,10 +327,8 @@ static struct inode *ext2_nfs_get_inode(struct
> > super_block *sb,
> >     if (ino > le32_to_cpu(EXT2_SB(sb)->s_es->s_inodes_count))
> >         return ERR_PTR(-ESTALE);
> >
> > -   /* iget isn't really right if the inode is currently unallocated!!
> > -    * ext2_read_inode currently does appropriate checks, but
> > -    * it might be "neater" to call ext2_get_inode first and check
> > -    * if the inode is valid.....
> > +   /*
> > +    * ext2_iget isn't really right if the inode is currently unallocated!!
>  OK, but we should keep there a note that ext2_iget() does appropriate
> checks to handle stale inodes.
>
>                                                                        Honza
> >      */
> >     inode = ext2_iget(sb, ino);
> >     if (IS_ERR(inode))
> > --
> > 1.7.4.1
> --
> Jan Kara <jack@suse.cz>
> SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/fs/ext2/super.c b/fs/ext2/super.c
index 1dd62ed..994ced3 100644
--- a/fs/ext2/super.c
+++ b/fs/ext2/super.c
@@ -327,10 +327,8 @@  static struct inode *ext2_nfs_get_inode(struct
super_block *sb,
    if (ino > le32_to_cpu(EXT2_SB(sb)->s_es->s_inodes_count))
        return ERR_PTR(-ESTALE);

-   /* iget isn't really right if the inode is currently unallocated!!
-    * ext2_read_inode currently does appropriate checks, but
-    * it might be "neater" to call ext2_get_inode first and check
-    * if the inode is valid.....
+   /*
+    * ext2_iget isn't really right if the inode is currently unallocated!!
     */
    inode = ext2_iget(sb, ino);