linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fs/epoll: remove an unnecessary argument of ep_busy_loop()
@ 2019-03-08  8:14 Peng Wang
  2019-03-19 15:32 ` Roman Penyaev
  0 siblings, 1 reply; 2+ messages in thread
From: Peng Wang @ 2019-03-08  8:14 UTC (permalink / raw)
  To: viro; +Cc: linux-fsdevel, linux-kernel, Peng Wang

When ep_busy_loop() is called, timed_out is always zero,
otherwise ep_poll() would return first.

Signed-off-by: Peng Wang <rocking@whu.edu.cn>
---
 fs/eventpoll.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/fs/eventpoll.c b/fs/eventpoll.c
index a5d219d920e7..0b3981ffc7ae 100644
--- a/fs/eventpoll.c
+++ b/fs/eventpoll.c
@@ -399,12 +399,12 @@ static bool ep_busy_loop_end(void *p, unsigned long start_time)
  *
  * we must do our busy polling with irqs enabled
  */
-static void ep_busy_loop(struct eventpoll *ep, int nonblock)
+static void ep_busy_loop(struct eventpoll *ep)
 {
 	unsigned int napi_id = READ_ONCE(ep->napi_id);
 
 	if ((napi_id >= MIN_NAPI_ID) && net_busy_loop_on())
-		napi_busy_loop(napi_id, nonblock ? NULL : ep_busy_loop_end, ep);
+		napi_busy_loop(napi_id, ep_busy_loop_end, ep);
 }
 
 static inline void ep_reset_busy_poll_napi_id(struct eventpoll *ep)
@@ -451,7 +451,7 @@ static inline void ep_set_busy_poll_napi_id(struct epitem *epi)
 
 #else
 
-static inline void ep_busy_loop(struct eventpoll *ep, int nonblock)
+static inline void ep_busy_loop(struct eventpoll *ep)
 {
 }
 
@@ -1781,7 +1781,7 @@ static int ep_poll(struct eventpoll *ep, struct epoll_event __user *events,
 fetch_events:
 
 	if (!ep_events_available(ep))
-		ep_busy_loop(ep, timed_out);
+		ep_busy_loop(ep);
 
 	eavail = ep_events_available(ep);
 	if (eavail)
-- 
2.19.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-03-19 15:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-08  8:14 [PATCH] fs/epoll: remove an unnecessary argument of ep_busy_loop() Peng Wang
2019-03-19 15:32 ` Roman Penyaev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).