]> granicus.if.org Git - zfs/commitdiff
zhack: Fix 'feature ref' comparison check
authorBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 1 Oct 2015 23:39:25 +0000 (16:39 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 17 May 2016 17:59:37 +0000 (10:59 -0700)
Signed-off-by: Ned Bass <bass6@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #3878

cmd/zhack/zhack.c

index a7da371c8a846f2c95f20bc99eb571f200d8c84d..eedd17c30710554c885f348bf101bad08f0d041e 100644 (file)
@@ -464,7 +464,7 @@ zhack_do_feature_ref(int argc, char **argv)
        if (decr) {
                uint64_t count;
                if (feature_get_refcount_from_disk(spa, &feature,
-                   &count) == 0 && count != 0) {
+                   &count) == 0 && count == 0) {
                        fatal(spa, FTAG, "feature refcount already 0: %s",
                            feature.fi_guid);
                }