]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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>
Thu, 12 Apr 2018 10:31:08 +0000 (12:31 +0200)
commitb00f942fef90095479dea5c81a8168123f850112
tree19725b7754c7b34f8b553f81084ac11b65888f70
parent731edfbaf9e50fdcd7bbdc4c5ac5f2c192d29bf2
staging: lustre: disable preempt while sampling processor id.

[ Upstream commit dbeccabf5294e80f7cc9ee566746c42211bed736 ]

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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c