Use task_pid_nr() in ip_vs_sync.c
authorPavel Emelyanov <xemul@openvz.org>
Fri, 19 Oct 2007 06:40:43 +0000 (23:40 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Fri, 19 Oct 2007 18:53:43 +0000 (11:53 -0700)
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 <xemul@openvz.org>
Acked-by: Sukadev Bhattiprolu <sukadev@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
net/ipv4/ipvs/ip_vs_sync.c

index 3b0d32291d5ec66c2dc2f3bc432bed4c453d928d..c99f2a33fb9e9165a3f2b7144ea609b6b151e34b 100644 (file)
@@ -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);
 
        /*