diff options
| author | Steven Rostedt <srostedt@redhat.com> | 2008-12-04 00:26:39 -0500 | 
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2008-12-04 09:09:37 +0100 | 
| commit | 5ef6476190d24419a9a537baa0b5641845136989 (patch) | |
| tree | 668d3e02acf97745d2a2e701e4b161cbd6f890bf | |
| parent | 804a685162a7080386714166776f57255a75238e (diff) | |
| download | olio-linux-3.10-5ef6476190d24419a9a537baa0b5641845136989.tar.xz olio-linux-3.10-5ef6476190d24419a9a537baa0b5641845136989.zip  | |
pid: fix the do_each_pid_task() macro
Impact: macro side-effects fix
This patch adds parenthesis around 'pid' in the do_each_pid_task
macro to allow callers to pass in more complex parameters.
e.g.  do_each_pid_task(*pid, type, task)
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
| -rw-r--r-- | include/linux/pid.h | 4 | 
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/pid.h b/include/linux/pid.h index d7e98ff8021..bb206c56d1f 100644 --- a/include/linux/pid.h +++ b/include/linux/pid.h @@ -147,9 +147,9 @@ pid_t pid_vnr(struct pid *pid);  #define do_each_pid_task(pid, type, task)				\  	do {								\  		struct hlist_node *pos___;				\ -		if (pid != NULL)					\ +		if ((pid) != NULL)					\  			hlist_for_each_entry_rcu((task), pos___,	\ -				&pid->tasks[type], pids[type].node) { +				&(pid)->tasks[type], pids[type].node) {  			/*  			 * Both old and new leaders may be attached to  |