This reverts commit
77ecc085fed1af1000ca719522977b960aa6da52.
Al Viro colorfully says: "You should *NEVER* use sys_close() on failure
exit paths like that. Moreover, this kvm_put_kvm() becomes a double-put,
since closing the damn file will drop that reference to kvm. Please,
revert. anon_inode_getfd() should be used only when there's no possible
failures past its call".
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
#include <linux/slab.h>
#include <linux/sort.h>
#include <linux/bsearch.h>
-#include <linux/syscalls.h>
#include <asm/processor.h>
#include <asm/io.h>
if (kvm_create_vm_debugfs(kvm, r) < 0) {
kvm_put_kvm(kvm);
- sys_close(r);
return -ENOMEM;
}