When the libcfs_debug_mb module parameter is set
at module-load time it isn't range-checked. When
it is set via sysfs it is. This inconsistency
makes the code harder to follow.
It is quite safe to call cfs_trace_set_debug_mb()
and cfs_trace_get_debug_mb() before the module
is initialized as cfs_tcd_for_each() does nothing
before initializtion.
So change cfs_trace_set_debug_mb() - which does
range checking - to returned the ranged checked number (it currently
always returns zero) and use that as the new value, unless
cfs_trace_get_debug_mb() now returns a non-zero value.
Linux-commit:
205b154f3bd6fa3e95ceca8bba8d00122bb8fb04
Change-Id: I495097bbae138625e54a012bf06c96e62d206228
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Reviewed-on: https://review.whamcloud.com/37828
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>