vfs/epoll: Fix one bug of EPOLL_CTL_DEL.
N/A Signed-off-by: buyuer <dingddding@163.com>
This commit is contained in:
parent
c0f9c7b48c
commit
3b23f3f0b8
@ -275,7 +275,7 @@ int epoll_ctl(int epfd, int op, int fd, struct epoll_event *ev)
|
||||
{
|
||||
if (eph->poll[i].fd == fd)
|
||||
{
|
||||
if (i != eph->occupied - 1)
|
||||
if (i != eph->occupied)
|
||||
{
|
||||
memmove(&eph->data[i], &eph->data[i + 1],
|
||||
sizeof(epoll_data_t) * (eph->occupied - i));
|
||||
|
Loading…
Reference in New Issue
Block a user