Skip to contentSkip to conversation

vfs: remove an unneeded condition in show_vfsstat()

PATCH New Dan Carpenter 1 participant 1 message Mar 19, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vfs: remove an unneeded condition in show_vfsstat()

Static checkers complain that "err" is always zero here. This check is not needed after we applied 9d4d65748a5c ('vfs: make mounts and mountstats honor root dir like mountinfo does').

fs/proc_namespace.c +1 -2
index 8db932d..97540a7 100644
@@ -219,8 +219,7 @@ static int show_vfsstat(struct seq_file *m, struct vfsmount *mnt)
 	/* optional statistics */
 	if (sb->s_op->show_stats) {
 		seq_putc(m, ' ');
-		if (!err)
-			err = sb->s_op->show_stats(m, mnt_path.dentry);
+		err = sb->s_op->show_stats(m, mnt_path.dentry);
 	}
 
 	seq_putc(m, '\n');