* [PATCH]nilfs2: An unassigned variable is assigned to a never used structure member
@ 2009-08-09 11:13 Zhang Qiang
[not found] ` <4A7EAF46.6090302-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Zhang Qiang @ 2009-08-09 11:13 UTC (permalink / raw)
To: users-JrjvKiOkagjYtjvyW6yDsg, Ryusuke Konishi; +Cc: Zhang Qiang, Zhu Yanhai
nilfs2: In procedure 'nilfs_get_sb()', when a nilfs filesysttem is mounted for the first time, local variable 'nilfs->ns_last_cno' is used before loading the latest checkpoint number from disk (in 'nilfs_fill_super'). 'nilfs->ns_last_cno' is assigned to 'sd.cno', but 'sd.cno' has never been used in the procedure.
Signed-off-by: Zhang Qiang <zhangqiang.buaa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
fs/nilfs2/super.c | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/fs/nilfs2/super.c b/fs/nilfs2/super.c
index 8e2ec43..d8bfcfd 100644
--- a/fs/nilfs2/super.c
+++ b/fs/nilfs2/super.c
@@ -1125,10 +1125,6 @@ nilfs_get_sb(struct file_system_type *fs_type, int flags,
*/
sd.sbi = nilfs_find_sbinfo(nilfs, !(flags & MS_RDONLY), sd.cno);
- if (!sd.cno)
- /* trying to get the latest checkpoint. */
- sd.cno = nilfs_last_cno(nilfs);
-
/*
* Get super block instance holding the nilfs_sb_info struct.
* A new instance is allocated if no existing mount is present or
--
1.6.0.6
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH]nilfs2: An unassigned variable is assigned to a never used structure member
[not found] ` <4A7EAF46.6090302-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2009-08-09 12:54 ` Ryusuke Konishi
[not found] ` <20090809.215419.08269814.ryusuke-sG5X7nlA6pw@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Ryusuke Konishi @ 2009-08-09 12:54 UTC (permalink / raw)
To: zhangqiang.buaa-Re5JQEeQqe8AvxtiuMwx3w
Cc: qiang.z.zhang-ral2JQCrhuEAvxtiuMwx3w,
konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg,
yanhai.zhu-VuQAYsv1563Yd54FQh9/CA, users-JrjvKiOkagjYtjvyW6yDsg
Hi!
On Sun, 09 Aug 2009 19:13:10 +0800, Zhang Qiang wrote:
> nilfs2: In procedure 'nilfs_get_sb()', when a nilfs filesysttem is mounted for the first time, local variable 'nilfs->ns_last_cno' is used before loading the latest checkpoint number from disk (in 'nilfs_fill_super'). 'nilfs->ns_last_cno' is assigned to 'sd.cno', but 'sd.cno' has never been used in the procedure.
>
> Signed-off-by: Zhang Qiang <zhangqiang.buaa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>
> ---
> fs/nilfs2/super.c | 4 ----
> 1 files changed, 0 insertions(+), 4 deletions(-)
>
> diff --git a/fs/nilfs2/super.c b/fs/nilfs2/super.c
> index 8e2ec43..d8bfcfd 100644
> --- a/fs/nilfs2/super.c
> +++ b/fs/nilfs2/super.c
> @@ -1125,10 +1125,6 @@ nilfs_get_sb(struct file_system_type *fs_type, int flags,
> */
> sd.sbi = nilfs_find_sbinfo(nilfs, !(flags & MS_RDONLY), sd.cno);
>
> - if (!sd.cno)
> - /* trying to get the latest checkpoint. */
> - sd.cno = nilfs_last_cno(nilfs);
> -
> /*
> * Get super block instance holding the nilfs_sb_info struct.
> * A new instance is allocated if no existing mount is present or
> --
> 1.6.0.6
Right. The substitution became obsolete after a change merged in
2.6.31-rc1.
Applied. Thank you.
Ryusuke Konishi
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH]nilfs2: An unassigned variable is assigned to a never used structure member
[not found] ` <20090809.215419.08269814.ryusuke-sG5X7nlA6pw@public.gmane.org>
@ 2009-08-10 1:05 ` Zhang Qiang
0 siblings, 0 replies; 3+ messages in thread
From: Zhang Qiang @ 2009-08-10 1:05 UTC (permalink / raw)
To: Ryusuke Konishi
Cc: qiang.z.zhang-ral2JQCrhuEAvxtiuMwx3w,
konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg,
yanhai.zhu-VuQAYsv1563Yd54FQh9/CA, users-JrjvKiOkagjYtjvyW6yDsg
[-- Attachment #1.1: Type: text/plain, Size: 1464 bytes --]
2009/8/9 Ryusuke Konishi <ryusuke-sG5X7nlA6pw@public.gmane.org>
> Hi!
> On Sun, 09 Aug 2009 19:13:10 +0800, Zhang Qiang wrote:
> > nilfs2: In procedure 'nilfs_get_sb()', when a nilfs filesysttem is
> mounted for the first time, local variable 'nilfs->ns_last_cno' is used
> before loading the latest checkpoint number from disk (in
> 'nilfs_fill_super'). 'nilfs->ns_last_cno' is assigned to 'sd.cno', but
> 'sd.cno' has never been used in the procedure.
> >
> > Signed-off-by: Zhang Qiang <zhangqiang.buaa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> >
> > ---
> > fs/nilfs2/super.c | 4 ----
> > 1 files changed, 0 insertions(+), 4 deletions(-)
> >
> > diff --git a/fs/nilfs2/super.c b/fs/nilfs2/super.c
> > index 8e2ec43..d8bfcfd 100644
> > --- a/fs/nilfs2/super.c
> > +++ b/fs/nilfs2/super.c
> > @@ -1125,10 +1125,6 @@ nilfs_get_sb(struct file_system_type *fs_type, int
> flags,
> > */
> > sd.sbi = nilfs_find_sbinfo(nilfs, !(flags & MS_RDONLY), sd.cno);
> >
> > - if (!sd.cno)
> > - /* trying to get the latest checkpoint. */
> > - sd.cno = nilfs_last_cno(nilfs);
> > -
> > /*
> > * Get super block instance holding the nilfs_sb_info struct.
> > * A new instance is allocated if no existing mount is present or
> > --
> > 1.6.0.6
>
> Right. The substitution became obsolete after a change merged in
> 2.6.31-rc1.
>
> Applied. Thank you.
>
> Ryusuke Konishi
>
Thanks a lot :-)
-Regards
-Qiang
[-- Attachment #1.2: Type: text/html, Size: 2111 bytes --]
[-- Attachment #2: Type: text/plain, Size: 158 bytes --]
_______________________________________________
users mailing list
users-JrjvKiOkagjYtjvyW6yDsg@public.gmane.org
https://www.nilfs.org/mailman/listinfo/users
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-08-10 1:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-09 11:13 [PATCH]nilfs2: An unassigned variable is assigned to a never used structure member Zhang Qiang
[not found] ` <4A7EAF46.6090302-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2009-08-09 12:54 ` Ryusuke Konishi
[not found] ` <20090809.215419.08269814.ryusuke-sG5X7nlA6pw@public.gmane.org>
2009-08-10 1:05 ` Zhang Qiang
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.