diff options
author | Ned Bass <[email protected]> | 2017-08-02 21:16:12 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2017-08-02 21:16:12 -0700 |
commit | ecb2b7dc7f8f7273c215fb30c984bde08e75b852 (patch) | |
tree | 55e26ef1e29163fba495ba517d8133d475169651 /module/zfs/zap_leaf.c | |
parent | 6710381680b0f551c37627e3a5a4886ccf99983f (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_leaf.c')
-rw-r--r-- | module/zfs/zap_leaf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/module/zfs/zap_leaf.c b/module/zfs/zap_leaf.c index c342695c7..5341fc098 100644 --- a/module/zfs/zap_leaf.c +++ b/module/zfs/zap_leaf.c @@ -589,7 +589,7 @@ zap_entry_create(zap_leaf_t *l, zap_name_t *zn, uint32_t cd, numchunks = 1 + ZAP_LEAF_ARRAY_NCHUNKS(zn->zn_key_orig_numints * zn->zn_key_intlen) + ZAP_LEAF_ARRAY_NCHUNKS(valuelen); if (numchunks > ZAP_LEAF_NUMCHUNKS(l)) - return (E2BIG); + return (SET_ERROR(E2BIG)); if (cd == ZAP_NEED_CD) { /* find the lowest unused cd */ |