epoll: Split out the guts of ctl_add and ctl_del
authorBarret Rhoden <brho@cs.berkeley.edu>
Mon, 18 Dec 2017 16:21:38 +0000 (11:21 -0500)
committerBarret Rhoden <brho@cs.berkeley.edu>
Wed, 20 Dec 2017 18:37:08 +0000 (13:37 -0500)
commit3697fc61ed4e9cc199cb98cc3acc4c752be933ff
treef082e696ada4af29f3e51034ab376689ed62739d
parente1afa36e0e69e01eeb2289e5ee3dc83426f3623b
epoll: Split out the guts of ctl_add and ctl_del

This way we don't do sock lookups when we know they will fail.
Previously, whenever we recursively called __epoll_ctl_add() on the listen
FD, that sock lookup would always fail.

It's a little hard to see from the diff, but this only moves the actual
ctl_add and ctl_del functionality into separate helpers.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
user/iplib/epoll.c