diff mbox series

[net-next] eventpoll: Don't re-zero eventpoll fields

Message ID 20240807105231.179158-1-jdamato@fastly.com (mailing list archive)
State Not Applicable
Delegated to: Netdev Maintainers
Headers show
Series [net-next] eventpoll: Don't re-zero eventpoll fields | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 29 this patch: 29
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 4 of 4 maintainers
netdev/build_clang success Errors and warnings before: 29 this patch: 29
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 32 this patch: 32
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 11 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest fail net-next-2024-08-07--15-00 (tests: 706)

Commit Message

Joe Damato Aug. 7, 2024, 10:52 a.m. UTC
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.

Signed-off-by: Joe Damato <jdamato@fastly.com>
Reviewed-by: Martin Karsten <mkarsten@uwaterloo.ca>
---
 fs/eventpoll.c | 5 -----
 1 file changed, 5 deletions(-)

Comments

Jan Kara Aug. 7, 2024, 12:56 p.m. UTC | #1
On Wed 07-08-24 10:52:31, Joe Damato wrote:
> 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.
> 
> Signed-off-by: Joe Damato <jdamato@fastly.com>
> Reviewed-by: Martin Karsten <mkarsten@uwaterloo.ca>

Looks good. Feel free to add:

Reviewed-by: Jan Kara <jack@suse.cz>

								Honza

> ---
>  fs/eventpoll.c | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/fs/eventpoll.c b/fs/eventpoll.c
> index f53ca4f7fced..6c0a1e9715ea 100644
> --- a/fs/eventpoll.c
> +++ b/fs/eventpoll.c
> @@ -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;
> -- 
> 2.25.1
>
Christian Brauner Aug. 7, 2024, 2:29 p.m. UTC | #2
On Wed, 07 Aug 2024 10:52:31 +0000, Joe Damato wrote:
> 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.
> 
> [...]

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
diff mbox series

Patch

diff --git a/fs/eventpoll.c b/fs/eventpoll.c
index f53ca4f7fced..6c0a1e9715ea 100644
--- a/fs/eventpoll.c
+++ b/fs/eventpoll.c
@@ -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;