diff mbox series

io_uring: remove the variable tmin that is not useful

Message ID 1564472806-413-1-git-send-email-liuyun01@kylinos.cn (mailing list archive)
State New, archived
Headers show
Series io_uring: remove the variable tmin that is not useful | expand

Commit Message

Jackie Liu July 30, 2019, 7:46 a.m. UTC
*nr_events is always equal to 0, tmin has no meaning.

Signed-off-by: Jackie Liu <liuyun01@kylinos.cn>
---
 fs/io_uring.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/fs/io_uring.c b/fs/io_uring.c
index 012bc0e..4204a53 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -808,12 +808,7 @@  static int io_iopoll_check(struct io_ring_ctx *ctx, unsigned *nr_events,
 	int ret = 0;
 
 	do {
-		int tmin = 0;
-
-		if (*nr_events < min)
-			tmin = min - *nr_events;
-
-		ret = io_iopoll_getevents(ctx, nr_events, tmin);
+		ret = io_iopoll_getevents(ctx, nr_events, min);
 		if (ret <= 0)
 			break;
 		ret = 0;