summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2016-07-29 17:10:11 -0700
committerBrian Behlendorf <[email protected]>2016-08-02 13:14:18 -0700
commitefe7978d89f84f08afd9a3bf84a293773b66632d (patch)
tree88a6604db3b08fcbd83a1687e4fc26b15f12c08a
parent5b1bc1a1d8ae284f834f239ab0309c6ce96ab74f (diff)
Fix gcc self-comparison warning
As of gcc 6.1.1 20160621 (Red Hat 6.1.1-3) a self-comparison is detected by gcc in metaslab_alloc(). Resolve the warning by passing a physical size of 0 to BP_SET_BIRTH() as it done by other callers. module/zfs/metaslab.c: In function ‘metaslab_alloc’: module/zfs/metaslab.c:2575:184: error: self-comparison always evaluates to true [-Werror=tautological-compare] Signed-off-by: Brian Behlendorf <[email protected]> Signed-off-by: Gvozden Neskovic <[email protected]> Issue #4907
-rw-r--r--module/zfs/metaslab.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/module/zfs/metaslab.c b/module/zfs/metaslab.c
index c2c1d2dfc..a4cf39a3f 100644
--- a/module/zfs/metaslab.c
+++ b/module/zfs/metaslab.c
@@ -2572,7 +2572,7 @@ metaslab_alloc(spa_t *spa, metaslab_class_t *mc, uint64_t psize, blkptr_t *bp,
spa_config_exit(spa, SCL_ALLOC, FTAG);
- BP_SET_BIRTH(bp, txg, txg);
+ BP_SET_BIRTH(bp, txg, 0);
return (0);
}