From ecb2b7dc7f8f7273c215fb30c984bde08e75b852 Mon Sep 17 00:00:00 2001 From: Ned Bass Date: Wed, 2 Aug 2017 21:16:12 -0700 Subject: 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 Reviewed-by: Giuseppe Di Natale Reviewed-by: Brian Behlendorf Reviewed by: Matthew Ahrens Signed-off-by: Ned Bass Closes #6441 --- module/zfs/arc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/zfs/arc.c') diff --git a/module/zfs/arc.c b/module/zfs/arc.c index 9f1dccaf4..481c38189 100644 --- a/module/zfs/arc.c +++ b/module/zfs/arc.c @@ -6187,7 +6187,7 @@ arc_kstat_update(kstat_t *ksp, int rw) arc_stats_t *as = ksp->ks_data; if (rw == KSTAT_WRITE) { - return (EACCES); + return (SET_ERROR(EACCES)); } else { arc_kstat_update_state(arc_anon, &as->arcstat_anon_size, -- cgit v1.2.3