rfifolock: no need to get thread identifier when nesting
authorChanglong Xie <xiecl.fnst@cn.fujitsu.com>
Tue, 10 May 2016 09:59:08 +0000 (17:59 +0800)
committerStefan Hajnoczi <stefanha@redhat.com>
Mon, 16 May 2016 22:29:44 +0000 (15:29 -0700)
Signed-off-by: Changlong Xie <xiecl.fnst@cn.fujitsu.com>
Reviewed-by: Denis V. Lunev <den@openvz.org>
Message-id: 1462874348-32396-1-git-send-email-xiecl.fnst@cn.fujitsu.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
util/rfifolock.c

index c22f5feeeebe2a4f5d142b5f558039d83ad50a8f..084c2f0ea1c5c56d4e0b9a8a802c4d660ad4a094 100644 (file)
@@ -58,9 +58,9 @@ void rfifolock_lock(RFifoLock *r)
             }
             qemu_cond_wait(&r->cond, &r->lock);
         }
+        qemu_thread_get_self(&r->owner_thread);
     }
 
-    qemu_thread_get_self(&r->owner_thread);
     r->nesting++;
     qemu_mutex_unlock(&r->lock);
 }