All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Alexander Viro <viro@zeniv.linux.org.uk>,
	"Dmitry V. Levin" <ldv@altlinux.org>
Cc: linux-fsdevel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch] vfs: remove an unneeded condition in show_vfsstat()
Date: Thu, 19 Mar 2015 13:18:59 +0300	[thread overview]
Message-ID: <20150319101859.GB13330@mwanda> (raw)

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').

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/fs/proc_namespace.c b/fs/proc_namespace.c
index 8db932d..97540a7 100644
--- a/fs/proc_namespace.c
+++ b/fs/proc_namespace.c
@@ -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');

WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Alexander Viro <viro@zeniv.linux.org.uk>,
	"Dmitry V. Levin" <ldv@altlinux.org>
Cc: linux-fsdevel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch] vfs: remove an unneeded condition in show_vfsstat()
Date: Thu, 19 Mar 2015 10:18:59 +0000	[thread overview]
Message-ID: <20150319101859.GB13330@mwanda> (raw)

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').

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/fs/proc_namespace.c b/fs/proc_namespace.c
index 8db932d..97540a7 100644
--- a/fs/proc_namespace.c
+++ b/fs/proc_namespace.c
@@ -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');

             reply	other threads:[~2015-03-19 10:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-19 10:18 Dan Carpenter [this message]
2015-03-19 10:18 ` [patch] vfs: remove an unneeded condition in show_vfsstat() Dan Carpenter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150319101859.GB13330@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=ldv@altlinux.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.