All of lore.kernel.org
 help / color / mirror / Atom feed
* [Cluster-devel] [PATCH 1/3] gfs2-utils: Fix two logic errors
@ 2014-06-05  1:28 Andrew Price
  2014-06-05  1:28 ` [Cluster-devel] [PATCH 2/3] gfs2_edit: Ensure all leaf blocks in per_node are saved Andrew Price
  2014-06-05  1:28 ` [Cluster-devel] [PATCH 3/3] gfs2-utils tests: Add small-block savemeta tests Andrew Price
  0 siblings, 2 replies; 5+ messages in thread
From: Andrew Price @ 2014-06-05  1:28 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Two uses of lgfs2_get_leaf_ptr() were still expecting it to return 0 on
failure. Remove the negations.

Signed-off-by: Andrew Price <anprice@redhat.com>
---
 gfs2/edit/savemeta.c | 2 +-
 gfs2/fsck/pass2.c    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gfs2/edit/savemeta.c b/gfs2/edit/savemeta.c
index e336100..a43045f 100644
--- a/gfs2/edit/savemeta.c
+++ b/gfs2/edit/savemeta.c
@@ -542,7 +542,7 @@ static void save_inode_data(struct metafd *mfd)
 		int li;
 
 		for (li = 0; li < (1 << inode->i_di.di_depth); li++) {
-			if (!lgfs2_get_leaf_ptr(inode, li, &leaf_no)) {
+			if (lgfs2_get_leaf_ptr(inode, li, &leaf_no)) {
 				fprintf(stderr, "Could not read leaf index %d in dinode %"PRIu64"\n", li,
 				        (uint64_t)inode->i_di.di_num.no_addr);
 				exit(-1);
diff --git a/gfs2/fsck/pass2.c b/gfs2/fsck/pass2.c
index 2474ccb..2971b8c 100644
--- a/gfs2/fsck/pass2.c
+++ b/gfs2/fsck/pass2.c
@@ -370,7 +370,7 @@ static int wrong_leaf(struct gfs2_inode *ip, struct gfs2_inum *entry,
 		    de->de_type) == 0) {
 		log_err(_("The misplaced directory entry was moved to a "
 			  "valid leaf block.\n"));
-		if (!lgfs2_get_leaf_ptr(ip, hash_index, &real_leaf)) {
+		if (lgfs2_get_leaf_ptr(ip, hash_index, &real_leaf)) {
 			log_err(_("Could not read leaf %d in dinode %"PRIu64": %s\n"), hash_index,
 			        (uint64_t)ip->i_di.di_num.no_addr, strerror(errno));
 		}
-- 
1.9.3



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-06-05 10:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-05  1:28 [Cluster-devel] [PATCH 1/3] gfs2-utils: Fix two logic errors Andrew Price
2014-06-05  1:28 ` [Cluster-devel] [PATCH 2/3] gfs2_edit: Ensure all leaf blocks in per_node are saved Andrew Price
2014-06-05  9:39   ` Steven Whitehouse
2014-06-05 10:39     ` Andrew Price
2014-06-05  1:28 ` [Cluster-devel] [PATCH 3/3] gfs2-utils tests: Add small-block savemeta tests Andrew Price

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.