staging: lustre: disable preempt while sampling processor id.
authorNeilBrown <neilb@suse.com>
Mon, 18 Dec 2017 23:01:47 +0000 (10:01 +1100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Jan 2018 15:03:44 +0000 (16:03 +0100)
commitdbeccabf5294e80f7cc9ee566746c42211bed736
tree1485413f0661ce4cac9561c98f5156396cbe538b
parent213b14b1fa55790f55b180ed5121b07f037c7ddd
staging: lustre: disable preempt while sampling processor id.

Calling smp_processor_id() without disabling preemption
triggers a warning (if CONFIG_DEBUG_PREEMPT).
I think the result of cfs_cpt_current() is only used as a hint for
load balancing, rather than as a precise and stable indicator of
the current CPU.  So it doesn't need to be called with
preemption disabled.

So disable preemption inside cfs_cpt_current() to silence the warning.

Signed-off-by: NeilBrown <neilb@suse.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c