OSDN Git Service

KVM: PPC: E500: Replace current->mm by kvm->mm
authorLeonardo Bras <leonardo@linux.ibm.com>
Mon, 23 Sep 2019 21:24:08 +0000 (18:24 -0300)
committerPaul Mackerras <paulus@ozlabs.org>
Tue, 22 Oct 2019 05:29:01 +0000 (16:29 +1100)
commitf41c4989c8de1fa70aafe950abaf80c56a8b8712
treef6535e8d44d066062fb03495d7639c7ed100ffb4
parent258ed7d02843052d127df2264c8b342276ced18a
KVM: PPC: E500: Replace current->mm by kvm->mm

Given that in kvm_create_vm() there is:
kvm->mm = current->mm;

And that on every kvm_*_ioctl we have:
if (kvm->mm != current->mm)
return -EIO;

I see no reason to keep using current->mm instead of kvm->mm.

By doing so, we would reduce the use of 'global' variables on code, relying
more in the contents of kvm struct.

Signed-off-by: Leonardo Bras <leonardo@linux.ibm.com>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
arch/powerpc/kvm/e500_mmu_host.c