Skip to contentSkip to conversation

nilfs2: An unassigned variable is assigned to a never used structure member

PATCH Applied Zhang Qiang 2 participants 3 messages Aug 9, 2009 – Aug 10, 2009 2 messages not in the archive NILFS2 filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nilfs2: An unassigned variable is assigned to a never used structure member

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.

---
 fs/nilfs2/super.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)
fs/nilfs2/super.c +0 -4
index 8e2ec43..d8bfcfd 100644
@@ -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
Signature · 1 line
1.6.0.6
#2 lore raw
In reply to a message not in the archive

Hi!

Quoted 25 lines · Zhang Qiang

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.

---
 fs/nilfs2/super.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)
fs/nilfs2/super.c +0 -4
index 8e2ec43..d8bfcfd 100644
@@ -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
Signature · 1 line
1.6.0.6

Right. The substitution became obsolete after a change merged in 2.6.31-rc1.

Applied. Thank you.

Ryusuke Konishi

#4 lore raw
In reply to a message not in the archive

2009/8/9 Ryusuke Konishi <[email protected]>

Quoted 33 lines

Hi!

Quoted 1 line · Zhang Qiang

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.

fs/nilfs2/super.c nilfs_get_sb(struct file_system_type *fs_type, int

Quoted 12 lines
---
 fs/nilfs2/super.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)
fs/nilfs2/super.c +0 -0
index 8e2ec43..d8bfcfd 100644
@@ -1125,10 +1125,6 @@ nilfs_get_sb(struct file_system_type *fs_type, int

flags,

Quoted 11 lines
fs/nilfs2/super.c +0 -5
       */
      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
--
Quoted 1 line

1.6.0.6

Quoted 7 lines

Right. The substitution became obsolete after a change merged in 2.6.31-rc1.

Applied. Thank you.

Ryusuke Konishi

Thanks a lot :-)

-Regards
-Qiang

_______________________________________________
users mailing list
[email protected]
https://www.nilfs.org/mailman/listinfo/users