[PATCH] xfsprogs: fix cut & paste error in xfs_fsr.c
Eric Sandeen
sandeen at redhat.com
Tue Nov 10 12:21:10 CST 2015
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 at 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 ||
More information about the xfs
mailing list