If ->vfork_stop was set, it was set by us, no need to take utrace->lock
to check it.

Signed-off-by: Oleg Nesterov <o...@redhat.com>
---

 kernel/utrace.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

--- PU/kernel/utrace.c~UTRACE_1_vfork_stop      2009-08-19 14:00:57.000000000 
+0200
+++ PU/kernel/utrace.c  2009-08-19 19:43:58.000000000 +0200
@@ -1601,10 +1601,8 @@ void utrace_finish_vfork(struct task_str
 {
        struct utrace *utrace = task_utrace_struct(task);
 
-       spin_lock(&utrace->lock);
-       if (!utrace->vfork_stop)
-               spin_unlock(&utrace->lock);
-       else {
+       if (utrace->vfork_stop) {
+               spin_lock(&utrace->lock);
                utrace->vfork_stop = 0;
                spin_unlock(&utrace->lock);
                utrace_stop(task, utrace, UTRACE_RESUME); /* XXX */

Reply via email to