Skip to content

Commit

Permalink
staging/lustre: call set_cpus_allowed_ptr instead of set_cpus_allowed
Browse files Browse the repository at this point in the history
set_cpus_allowed is not available with CONFIG_CPUMASK_OFFSTACK on.
We should call set_cpus_allowed_ptr instead.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Peng Tao authored and Greg Kroah-Hartman committed Jun 6, 2013
1 parent f2c3d80 commit 32654b6
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@
#define NR_CPUS 1
#endif

#define cfs_set_cpus_allowed(t, mask) set_cpus_allowed(t, mask)

/*
* cache
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
2 changes: 1 addition & 1 deletion drivers/staging/lustre/lustre/libcfs/linux/linux-cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
4 changes: 2 additions & 2 deletions drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 32654b6

Please sign in to comment.