summaryrefslogtreecommitdiffstats
path: root/module/zfs/zap.c
diff options
context:
space:
mode:
authorNed Bass <[email protected]>2017-08-02 21:16:12 -0700
committerBrian Behlendorf <[email protected]>2017-08-02 21:16:12 -0700
commitecb2b7dc7f8f7273c215fb30c984bde08e75b852 (patch)
tree55e26ef1e29163fba495ba517d8133d475169651 /module/zfs/zap.c
parent6710381680b0f551c37627e3a5a4886ccf99983f (diff)
Use SET_ERROR for constant non-zero return codes
Update many return and assignment statements to follow the convention of using the SET_ERROR macro when returning a hard-coded non-zero value from a function. This aids debugging by recording the error codes in the debug log. Reviewed-by: George Melikov <[email protected]> Reviewed-by: Giuseppe Di Natale <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed by: Matthew Ahrens <[email protected]> Signed-off-by: Ned Bass <[email protected]> Closes #6441
Diffstat (limited to 'module/zfs/zap.c')
-rw-r--r--module/zfs/zap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/module/zfs/zap.c b/module/zfs/zap.c
index ee9962bff..5557c28eb 100644
--- a/module/zfs/zap.c
+++ b/module/zfs/zap.c
@@ -525,7 +525,7 @@ zap_get_leaf_byblk(zap_t *zap, uint64_t blkid, dmu_tx_t *tx, krw_t lt,
* already be freed, so this should be perfectly fine.
*/
if (blkid == 0)
- return (ENOENT);
+ return (SET_ERROR(ENOENT));
dn = dmu_buf_dnode_enter(zap->zap_dbuf);
err = dmu_buf_hold_by_dnode(dn,
@@ -767,7 +767,7 @@ fzap_checksize(uint64_t integer_size, uint64_t num_integers)
}
if (integer_size * num_integers > ZAP_MAXVALUELEN)
- return (E2BIG);
+ return (SET_ERROR(E2BIG));
return (0);
}