Skip to content

Commit ca0488a

Browse files
Sebastian Andrzej Siewiorbonzini
authored andcommitted
kvm: don't redefine flags as something else
The function irqfd_wakeup() has flags defined as __poll_t and then it has additional flags which is used for irqflags. Redefine the inner flags variable as iflags so it does not shadow the outer flags. Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: "Radim Krčmář" <rkrcmar@redhat.com> Cc: kvm@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
1 parent f285c63 commit ca0488a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

virt/kvm/eventfd.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,9 @@ irqfd_wakeup(wait_queue_entry_t *wait, unsigned mode, int sync, void *key)
214214

215215
if (flags & EPOLLHUP) {
216216
/* The eventfd is closing, detach from KVM */
217-
unsigned long flags;
217+
unsigned long iflags;
218218

219-
spin_lock_irqsave(&kvm->irqfds.lock, flags);
219+
spin_lock_irqsave(&kvm->irqfds.lock, iflags);
220220

221221
/*
222222
* We must check if someone deactivated the irqfd before
@@ -230,7 +230,7 @@ irqfd_wakeup(wait_queue_entry_t *wait, unsigned mode, int sync, void *key)
230230
if (irqfd_is_active(irqfd))
231231
irqfd_deactivate(irqfd);
232232

233-
spin_unlock_irqrestore(&kvm->irqfds.lock, flags);
233+
spin_unlock_irqrestore(&kvm->irqfds.lock, iflags);
234234
}
235235

236236
return 0;

0 commit comments

Comments
 (0)