Skip to contentSkip to conversation

Use task_pid_nr() in ip_vs_sync.c

PATCH In review Pavel Emelyanov 2 participants 2 messages Aug 29, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Use task_pid_nr() in ip_vs_sync.c

The sync_master_pid and sync_backup_pid are set in set_sync_pid() and are used later for set/not-set checks and in printk. So it is safe to use the global pid value in this case.

---

net/ipv4/ipvs/ip_vs_sync.c +0 -0
index 959c08d..d0798a5 100644
@@ -794,7 +794,7 @@ static int sync_thread(void *startup)
 
	add_wait_queue(&sync_wait, &wait);

- set_sync_pid(state, current->pid);

+	set_sync_pid(state, task_pid_nr(current));
	complete(tinfo->startup);

	/*
Acked-by on v1 1/1
#1 lore raw

Pavel Emelianov [[email protected]] wrote:

| The sync_master_pid and sync_backup_pid are set in set_sync_pid()
| and are used later for set/not-set checks and in printk. So it
| is safe to use the global pid value in this case.
| 
| Signed-off-by: Pavel Emelyanov <[email protected]>
| 
| ---
| 
| diff --git a/net/ipv4/ipvs/ip_vs_sync.c b/net/ipv4/ipvs/ip_vs_sync.c
| index 959c08d..d0798a5 100644
| --- a/net/ipv4/ipvs/ip_vs_sync.c
| +++ b/net/ipv4/ipvs/ip_vs_sync.c
| @@ -794,7 +794,7 @@ static int sync_thread(void *startup)
| 
| 	add_wait_queue(&sync_wait, &wait);
| 
| -	set_sync_pid(state, current->pid);
| +	set_sync_pid(state, task_pid_nr(current));
| 	complete(tinfo->startup);
| 
| 	/*