From 370bbf66aec5b4208fc8e49dfbc0d9e395f2e8f3 Mon Sep 17 00:00:00 2001 From: Tom Caputi Date: Mon, 2 Jul 2018 16:37:48 -0400 Subject: [PATCH] Fix coverity defects: CID 176037 CID 176037: Uninitialized scalar variable This patch fixes an uninitialized variable defect caught by coverity and introduced in 69830602 Reviewed-by: Brian Behlendorf Signed-off-by: Tom Caputi Closes #7667 --- module/zfs/dbuf.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/module/zfs/dbuf.c b/module/zfs/dbuf.c index 0a8e6d08b..49e23e1d7 100644 --- a/module/zfs/dbuf.c +++ b/module/zfs/dbuf.c @@ -1263,6 +1263,10 @@ dbuf_read_impl(dmu_buf_impl_t *db, zio_t *zio, uint32_t flags) return (0); } + + SET_BOOKMARK(&zb, dmu_objset_id(db->db_objset), + db->db.db_object, db->db_level, db->db_blkid); + /* * All bps of an encrypted os should have the encryption bit set. * If this is not true it indicates tampering and we report an error. @@ -1293,9 +1297,6 @@ dbuf_read_impl(dmu_buf_impl_t *db, zio_t *zio, uint32_t flags) dbuf_add_ref(db, NULL); - SET_BOOKMARK(&zb, dmu_objset_id(db->db_objset), - db->db.db_object, db->db_level, db->db_blkid); - zio_flags = (flags & DB_RF_CANFAIL) ? ZIO_FLAG_CANFAIL : ZIO_FLAG_MUSTSUCCEED; -- 2.40.0