fs: eventfd: fix obsolete comment
Quoted 10 lines · Matthew Wilcox
Quoted 5 lines · linmiaohe
From: Miaohe Lin <[email protected]>
*
- *eventfd_fget
+ * fdgetBut this is wrong. The error pointer is returned from
eventfd_ctx_fileget(), not from fdget.Looking at the three callers of
eventfd_ctx_fileget(), I think it would make sense to do this:
Many thanks for your review and nice advice. But I think this patch should belong to you as you found this. I really did nothing about it. Maybe a Reviewed-by tag for me is enough.
Quoted 5 lines
drivers/vfio/virqfd.c +0
-0@@ -126,11 +126,6 @@ int vfio_virqfd_enable(void *opaque,INIT_WORK (&virqfd->inject, virqfd_inject);
drivers/vfio/virqfd.c int vfio_virqfd_enable(void *opaque, · line 131
Quoted 10 lines
drivers/vfio/virqfd.c +0
-5irqfd =fdget (fd); -if (!irqfd.file) { - ret = -EBADF ; - goto err_fd; - } - ctx =eventfd_ctx_fileget (irqfd.file);if (IS_ERR (ctx)) { ret =PTR_ERR (ctx);
The err_fd label should further be removed, as after this change, it's no longer used. Other callers should drop unused jump label too.
Quoted 1 line
(not even compile tested)
Thanks again.