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/dsl_scan.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/dsl_scan.c')
-rw-r--r-- | module/zfs/dsl_scan.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/module/zfs/dsl_scan.c b/module/zfs/dsl_scan.c index 74cbce0d3..9399ec71a 100644 --- a/module/zfs/dsl_scan.c +++ b/module/zfs/dsl_scan.c @@ -157,7 +157,7 @@ dsl_scan_init(dsl_pool_t *dp, uint64_t txg) scn->scn_async_destroying) { spa->spa_errata = ZPOOL_ERRATA_ZOL_2094_ASYNC_DESTROY; - return (EOVERFLOW); + return (SET_ERROR(EOVERFLOW)); } bcopy(zaptmp, &scn->scn_phys, @@ -2081,7 +2081,7 @@ dsl_scan(dsl_pool_t *dp, pool_scan_func_t func) int err = dsl_scrub_set_pause_resume(scn->scn_dp, POOL_SCRUB_NORMAL); if (err == 0) - return (ECANCELED); + return (SET_ERROR(ECANCELED)); return (SET_ERROR(err)); } |