eventpoll: Don't re-zero eventpoll fields
Subsystems (3)
PATCH 1/1 eventpoll: Don't re-zero eventpoll fields
Remove redundant and unnecessary code.
ep_alloc uses kzalloc to create struct eventpoll, so there is no need to set fields to defaults of 0. This was accidentally introduced in commit 85455c795c07 ("eventpoll: support busy poll per epoll instance") and expanded on in follow-up commits.
--- fs/eventpoll.c | 5 ----- 1 file changed, 5 deletions(-)
fs/eventpoll.c +0 -5
@@ -2200,11 +2200,6 @@ static int do_epoll_create(int flags) error =PTR_ERR (file); goto out_free_fd; } -#ifdef CONFIG_NET_RX_BUSY_POLL - ep->busy_poll_usecs =0 ; - ep->busy_poll_budget =0 ; - ep->prefer_busy_poll = false; -#endif ep->file = file;fd_install (fd, file);return fd;
Signature · 1 line
2.25.1
Quoted 9 lines · Joe Damato
Remove redundant and unnecessary code.
ep_allocuses kzalloc to create struct eventpoll, so there is no need to set fields to defaults of 0. This was accidentally introduced in commit85455c795c07("eventpoll: support busy poll per epoll instance") and expanded on in follow-up commits.Signed-off-by Joe Damato <[email protected]>Reviewed-by Martin Karsten <[email protected]>
Looks good. Feel free to add:
Honza
Quoted 23 lines
--- fs/eventpoll.c | 5 ----- 1 file changed, 5 deletions(-)fs/eventpoll.c +0
-5@@ -2200,11 +2200,6 @@ static int do_epoll_create(int flags) error =PTR_ERR (file); goto out_free_fd; } -#ifdef CONFIG_NET_RX_BUSY_POLL - ep->busy_poll_usecs =0 ; - ep->busy_poll_budget =0 ; - ep->prefer_busy_poll = false; -#endif ep->file = file;fd_install (fd, file);return fd;Signature · 1 line
2.25.1
Signature · 2 lines
Jan Kara <[email protected]> SUSE Labs, CR
Quoted 8 lines · Joe Damato
Remove redundant and unnecessary code.
ep_allocuses kzalloc to create struct eventpoll, so there is no need to set fields to defaults of 0. This was accidentally introduced in commit85455c795c07("eventpoll: support busy poll per epoll instance") and expanded on in follow-up commits.[...]
Applied to the vfs.misc.jeff branch of the vfs/vfs.git tree. Patches in the vfs.misc.jeff branch should appear in linux-next soon.
Please report any outstanding bugs that were missed during review in a new review to the original patch series allowing us to drop it.
It's encouraged to provide Acked-bys and Reviewed-bys even though the patch has now been applied. If possible patch trailers will be updated.
Note that commit hashes shown below are subject to change due to rebase, trailer updates or similar. If in doubt, please check the listed branch.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git branch: vfs.misc.jeff
[1/1] eventpoll: Don't re-zero eventpoll fields
https://git.kernel.org/vfs/vfs/c/394923595c20