From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: [PATCH] kvm: fix comment on locking Date: Tue, 5 May 2009 14:58:41 +0300 Message-ID: <20090505115841.GA16647@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii To: avi@redhat.com, kvm@vger.kernel.org Return-path: Received: from mx2.redhat.com ([66.187.237.31]:39300 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751139AbZEEL7k (ORCPT ); Tue, 5 May 2009 07:59:40 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n45BxfnG014920 for ; Tue, 5 May 2009 07:59:41 -0400 Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: __kvm_set_memory_region callers must (and do) take slots_lock, not mmap_sem, for write. Fix the comment to match this reality. Signed-off-by: Michael S. Tsirkin --- virt/kvm/kvm_main.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 605697e..060d86c 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -911,7 +911,7 @@ static int kvm_vm_release(struct inode *inode, struct file *filp) * * Discontiguous memory is allowed, mostly for framebuffers. * - * Must be called holding mmap_sem for write. + * Must be called holding slots_lock for write. */ int __kvm_set_memory_region(struct kvm *kvm, struct kvm_userspace_memory_region *mem, -- 1.6.3.rc3.1.g830204