From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ryusuke Konishi Subject: Re: [PATCH]nilfs2: An unassigned variable is assigned to a never used structure member Date: Sun, 09 Aug 2009 21:54:19 +0900 (JST) Message-ID: <20090809.215419.08269814.ryusuke@osrg.net> References: <4A7EAF46.6090302@gmail.com> Reply-To: NILFS Users mailing list Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4A7EAF46.6090302-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: users-bounces-JrjvKiOkagjYtjvyW6yDsg@public.gmane.org Errors-To: users-bounces-JrjvKiOkagjYtjvyW6yDsg@public.gmane.org To: zhangqiang.buaa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Cc: qiang.z.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org, konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org, yanhai.zhu-VuQAYsv1563Yd54FQh9/CA@public.gmane.org, users-JrjvKiOkagjYtjvyW6yDsg@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 > > --- > 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