All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: xfs@oss.sgi.com
Cc: jtulak@redhat.com
Subject: [PATCH] xfsprogs: fix cut & paste error in xfs_fsr.c
Date: Tue, 10 Nov 2015 12:21:10 -0600	[thread overview]
Message-ID: <56423596.3030300@redhat.com> (raw)

Commit:

7141fc xfsprogs: make fsr use mntinfo when there is no mntent

added an inadvertent "break;" to initallfs() after the call
to find_mountpoint_check(); this is likely a cut & paste error
from the call in find_mountpoint(), where we really *do* want to
stop after the first one we find.

Fix that by removing the break, and fix the declaration-after-code.

Addresses-Coverity-Id: 1338431
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---

I'll probably follow this with some other cleanups, but this is
the functional fix AFAICT.

diff --git a/fsr/xfs_fsr.c b/fsr/xfs_fsr.c
index b902acc..9332c57 100644
--- a/fsr/xfs_fsr.c
+++ b/fsr/xfs_fsr.c
@@ -433,12 +433,11 @@ initallfs(char *mtab)
 	}
 
 	while ( (mp = platform_mntent_next(&cursor)) != NULL) {
+		int rw = 0;
+
 		mntp = find_mountpoint_check(&sb, mp, &ms);
 		if (mntp == NULL)
 			continue;
-		break;
-
-		int rw = 0;
 
 		if (strcmp(mp->mnt_type, MNTTYPE_XFS ) != 0 ||
 		    stat64(mp->mnt_fsname, &sb) == -1 ||


_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

             reply	other threads:[~2015-11-10 18:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-10 18:21 Eric Sandeen [this message]
2015-11-10 18:45 ` [PATCH] xfsprogs: fix cut & paste error in xfs_fsr.c Eric Sandeen
2015-11-10 20:28 ` Dave Chinner
2015-11-10 20:35   ` Eric Sandeen
2015-11-11 13:13     ` Jan Tulak
2015-11-11 15:41       ` Eric Sandeen
2015-11-10 20:45   ` [PATCH] xfsprogs: tidy up xfs_fsr.c Eric Sandeen

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=56423596.3030300@redhat.com \
    --to=sandeen@redhat.com \
    --cc=jtulak@redhat.com \
    --cc=xfs@oss.sgi.com \
    /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.