virt: acrn: Use vfs_poll() instead of f_op->poll()
authorYejune Deng <yejune.deng@gmail.com>
Sun, 21 Feb 2021 13:33:06 +0000 (21:33 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Mar 2021 08:16:09 +0000 (09:16 +0100)
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 <yejune.deng@gmail.com>
Signed-off-by: Shuo Liu <shuo.a.liu@intel.com>
Link: https://lore.kernel.org/r/20210221133306.33530-1-shuo.a.liu@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/virt/acrn/irqfd.c

index a8766d5..98d6e9b 100644 (file)
@@ -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;
 
@@ -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);