KVM: PPC: Book3S: Replace current->mm by kvm->mm
authorLeonardo Bras <leonardo@linux.ibm.com>
Tue, 26 Nov 2019 22:36:30 +0000 (19:36 -0300)
committerPaul Mackerras <paulus@ozlabs.org>
Fri, 17 Jan 2020 04:08:28 +0000 (15:08 +1100)
commit8a9c8925149f195d0bbd6b42aa3130ced0a075fb
treec42a379e012ac386ae759986abb10167762dfcc7
parent4de0a8355463e068e443b48eb5ae32370155368b
KVM: PPC: Book3S: 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/book3s_64_mmu_hv.c
arch/powerpc/kvm/book3s_64_vio.c
arch/powerpc/kvm/book3s_hv.c