summaryrefslogtreecommitdiffstats
path: root/module/zfs
diff options
context:
space:
mode:
authorcao <[email protected]>2016-10-14 05:30:50 +0800
committerBrian Behlendorf <[email protected]>2016-10-13 14:30:50 -0700
commit3f93077b024d6e7658e655d3b897bcd3bb57504f (patch)
tree8367e4c43a1f73676a50a005b80fe9d84bdd6481 /module/zfs
parent05852b3467b44cdf88541ec67624cd1f5f2ded1d (diff)
Fix coverity defects: CID 150943, 150938
CID:150943, Type:Unintentional integer overflow CID:150938, Type:Explicit null dereferenced Reviewed-by: Tom Caputi <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: cao.xuewen <[email protected]> Closes #5255
Diffstat (limited to 'module/zfs')
-rw-r--r--module/zfs/dbuf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/module/zfs/dbuf.c b/module/zfs/dbuf.c
index 2ec41fb51..1d8c0518a 100644
--- a/module/zfs/dbuf.c
+++ b/module/zfs/dbuf.c
@@ -3538,7 +3538,7 @@ dbuf_write_children_ready(zio_t *zio, arc_buf_t *buf, void *vdb)
epbs = dn->dn_phys->dn_indblkshift - SPA_BLKPTRSHIFT;
/* Determine if all our children are holes */
- for (i = 0, bp = db->db.db_data; i < 1 << epbs; i++, bp++) {
+ for (i = 0, bp = db->db.db_data; i < 1ULL << epbs; i++, bp++) {
if (!BP_IS_HOLE(bp))
break;
}
@@ -3547,7 +3547,7 @@ dbuf_write_children_ready(zio_t *zio, arc_buf_t *buf, void *vdb)
* If all the children are holes, then zero them all out so that
* we may get compressed away.
*/
- if (i == 1 << epbs) {
+ if (i == 1ULL << epbs) {
/* didn't find any non-holes */
bzero(db->db.db_data, db->db.db_size);
}