All of lore.kernel.org
 help / color / mirror / Atom feed
* [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

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.