Skip to content

Commit

Permalink
virt: acrn: Use vfs_poll() instead of f_op->poll()
Browse files Browse the repository at this point in the history
Use a more advanced function vfs_poll() in acrn_irqfd_assign().
At the same time, modify the definition of events.

Signed-off-by: Yejune Deng <[email protected]>
Signed-off-by: Shuo Liu <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
YajunDeng authored and gregkh committed Mar 10, 2021
1 parent e54b788 commit dcf9625
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/virt/acrn/irqfd.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ static int acrn_irqfd_assign(struct acrn_vm *vm, struct acrn_irqfd *args)
{
struct eventfd_ctx *eventfd = NULL;
struct hsm_irqfd *irqfd, *tmp;
unsigned int events;
__poll_t events;
struct fd f;
int ret = 0;

Expand Down Expand Up @@ -158,7 +158,7 @@ static int acrn_irqfd_assign(struct acrn_vm *vm, struct acrn_irqfd *args)
mutex_unlock(&vm->irqfds_lock);

/* Check the pending event in this stage */
events = f.file->f_op->poll(f.file, &irqfd->pt);
events = vfs_poll(f.file, &irqfd->pt);

if (events & POLLIN)
acrn_irqfd_inject(irqfd);
Expand Down

0 comments on commit dcf9625

Please sign in to comment.