]> git.baikalelectronics.ru Git - kernel.git/commit
fs/epoll: deal with wait_queue only once
authorDavidlohr Bueso <dave@stgolabs.net>
Thu, 3 Jan 2019 23:27:26 +0000 (15:27 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 4 Jan 2019 21:13:46 +0000 (13:13 -0800)
commita6dfc6bbccce83a1c604c3b3fe94d68204c5b197
treef971e2b0f3dd64fd2fb6f46707c10cdf549de09d
parentd0bb294f0e9e6060410b600ab7922de64ed7cfc9
fs/epoll: deal with wait_queue only once

There is no reason why we rearm the waitiqueue upon every fetch_events
retry (for when events are found yet send_events() fails).  If nothing
else, this saves four lock operations per retry, and furthermore reduces
the scope of the lock even further.

[akpm@linux-foundation.org: restore code to original position, fix and reflow comment]
Link: http://lkml.kernel.org/r/20181114182532.27981-2-dave@stgolabs.net
Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
Cc: Jason Baron <jbaron@akamai.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/eventpoll.c