From 32654b679d458ee066ebadbca2bf95f58c278f0a Mon Sep 17 00:00:00 2001 From: Peng Tao Date: Thu, 6 Jun 2013 22:59:09 +0800 Subject: [PATCH] staging/lustre: call set_cpus_allowed_ptr instead of set_cpus_allowed set_cpus_allowed is not available with CONFIG_CPUMASK_OFFSTACK on. We should call set_cpus_allowed_ptr instead. Reported-by: Stephen Rothwell Signed-off-by: Peng Tao Signed-off-by: Andreas Dilger Signed-off-by: Greg Kroah-Hartman --- .../staging/lustre/include/linux/libcfs/linux/linux-prim.h | 2 -- .../lustre/include/linux/libcfs/linux/portals_compat25.h | 2 -- drivers/staging/lustre/lustre/libcfs/linux/linux-cpu.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c | 4 ++-- 4 files changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/staging/lustre/include/linux/libcfs/linux/linux-prim.h b/drivers/staging/lustre/include/linux/libcfs/linux/linux-prim.h index c346bcdf05bb..a4963a8dfdd8 100644 --- a/drivers/staging/lustre/include/linux/libcfs/linux/linux-prim.h +++ b/drivers/staging/lustre/include/linux/libcfs/linux/linux-prim.h @@ -79,8 +79,6 @@ #define NR_CPUS 1 #endif -#define cfs_set_cpus_allowed(t, mask) set_cpus_allowed(t, mask) - /* * cache */ diff --git a/drivers/staging/lustre/include/linux/libcfs/linux/portals_compat25.h b/drivers/staging/lustre/include/linux/libcfs/linux/portals_compat25.h index 2b9487267596..132a4bec3575 100644 --- a/drivers/staging/lustre/include/linux/libcfs/linux/portals_compat25.h +++ b/drivers/staging/lustre/include/linux/libcfs/linux/portals_compat25.h @@ -109,8 +109,6 @@ int proc_call_handler(void *data, int write, #define NR_CPUS 1 #endif -#define cfs_set_cpus_allowed(t, mask) set_cpus_allowed(t, mask) - #define cfs_register_sysctl_table(t, a) register_sysctl_table(t) #endif /* _PORTALS_COMPAT_H */ diff --git a/drivers/staging/lustre/lustre/libcfs/linux/linux-cpu.c b/drivers/staging/lustre/lustre/libcfs/linux/linux-cpu.c index 6e255ff55e85..95142d190971 100644 --- a/drivers/staging/lustre/lustre/libcfs/linux/linux-cpu.c +++ b/drivers/staging/lustre/lustre/libcfs/linux/linux-cpu.c @@ -627,7 +627,7 @@ cfs_cpt_bind(struct cfs_cpt_table *cptab, int cpt) if (cpu_isset(i, *cpumask)) continue; - rc = set_cpus_allowed(current, *cpumask); + rc = set_cpus_allowed_ptr(current, cpumask); set_mems_allowed(*nodemask); if (rc == 0) schedule(); /* switch to allowed CPU */ diff --git a/drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c b/drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c index 185841fe8d00..5a66a1be4228 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c +++ b/drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c @@ -395,8 +395,8 @@ static int ptlrpcd(void *arg) if (++index >= num_possible_cpus()) index = 0; } - cfs_set_cpus_allowed(current, - *cpumask_of_node(cpu_to_node(index))); + set_cpus_allowed_ptr(current, + cpumask_of_node(cpu_to_node(index))); } } #endif -- 2.45.2