2021-02-20 14:56:50

by Yejune Deng

[permalink] [raw]
Subject: [PATCH] virt: acrn: Use vfs_poll() instead of f_op->poll()

Use vfs_poll() is a more advanced function in acrn_irqfd_assign().
as the same time, modify the definition of events.

Signed-off-by: Yejune Deng <[email protected]>
---
drivers/virt/acrn/irqfd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/virt/acrn/irqfd.c b/drivers/virt/acrn/irqfd.c
index a8766d528e29..98d6e9b18f9e 100644
--- a/drivers/virt/acrn/irqfd.c
+++ b/drivers/virt/acrn/irqfd.c
@@ -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);
--
2.29.0


2021-02-21 01:53:55

by Shuo Liu

[permalink] [raw]
Subject: Re: [PATCH] virt: acrn: Use vfs_poll() instead of f_op->poll()



On 2/20/2021 22:53, Yejune Deng wrote:
> Use vfs_poll() is a more advanced function in acrn_irqfd_assign().
> as the same time, modify the definition of events.
>
> Signed-off-by: Yejune Deng <[email protected]>

Thanks for the update.
Reviewed-by: Shuo Liu <[email protected]>

Hi Greg,
Need i do more work on this patch?
Or you will review and apply on your tree directly?

Thanks
shuo

> ---
> drivers/virt/acrn/irqfd.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/virt/acrn/irqfd.c b/drivers/virt/acrn/irqfd.c
> index a8766d528e29..98d6e9b18f9e 100644
> --- a/drivers/virt/acrn/irqfd.c
> +++ b/drivers/virt/acrn/irqfd.c
> @@ -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);
>

2021-02-21 08:01:51

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH] virt: acrn: Use vfs_poll() instead of f_op->poll()

On Sun, Feb 21, 2021 at 09:50:42AM +0800, Liu, Shuo A wrote:
>
>
> On 2/20/2021 22:53, Yejune Deng wrote:
> > Use vfs_poll() is a more advanced function in acrn_irqfd_assign().
> > as the same time, modify the definition of events.
> >
> > Signed-off-by: Yejune Deng <[email protected]>
>
> Thanks for the update.
> Reviewed-by: Shuo Liu <[email protected]>
>
> Hi Greg,
> Need i do more work on this patch?
> Or you will review and apply on your tree directly?

Please resend it to me with your signed-off-by on it.

thanks,

greg k-h

2021-02-21 13:15:07

by Shuo Liu

[permalink] [raw]
Subject: Re: [PATCH] virt: acrn: Use vfs_poll() instead of f_op->poll()

On Sun 21.Feb'21 at 8:54:06 +0100, Greg Kroah-Hartman wrote:
>On Sun, Feb 21, 2021 at 09:50:42AM +0800, Liu, Shuo A wrote:
>>
>>
>> On 2/20/2021 22:53, Yejune Deng wrote:
>> > Use vfs_poll() is a more advanced function in acrn_irqfd_assign().
>> > as the same time, modify the definition of events.
>> >
>> > Signed-off-by: Yejune Deng <[email protected]>
>>
>> Thanks for the update.
>> Reviewed-by: Shuo Liu <[email protected]>
>>
>> Hi Greg,
>> Need i do more work on this patch?
>> Or you will review and apply on your tree directly?
>
>Please resend it to me with your signed-off-by on it.

OK.