From: Joe Damato <jdamato@fastly.com>
To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
linux-fsdevel@vger.kernel.org
Cc: sdf@google.com, edumazet@google.com, kuba@kernel.org,
mkarsten@uwaterloo.ca, Joe Damato <jdamato@fastly.com>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>
Subject: [PATCH net-next] eventpoll: Don't re-zero eventpoll fields
Date: Wed, 7 Aug 2024 10:52:31 +0000 [thread overview]
Message-ID: <20240807105231.179158-1-jdamato@fastly.com> (raw)
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(-)
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
next reply other threads:[~2024-08-07 10:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-07 10:52 Joe Damato [this message]
2024-08-07 12:56 ` [PATCH net-next] eventpoll: Don't re-zero eventpoll fields Jan Kara
2024-08-07 14:29 ` Christian Brauner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240807105231.179158-1-jdamato@fastly.com \
--to=jdamato@fastly.com \
--cc=brauner@kernel.org \
--cc=edumazet@google.com \
--cc=jack@suse.cz \
--cc=kuba@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mkarsten@uwaterloo.ca \
--cc=netdev@vger.kernel.org \
--cc=sdf@google.com \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox