Commit 42877042 authored by Davide Libenzi's avatar Davide Libenzi Committed by Linus Torvalds

[PATCH] epoll - just when you think it's over ...

This does:

- naming cleanup: ep_* -> eventpoll_* for non-static functions ( 2 )

- No more limit of 2 poll wait queue for each file*

Before epoll used to have, inside its item struct, space for two wait
queues. This was driven by the fact that during a f_op->poll() each file
won't register more than one read and one write wait queue. Now, I'm not
sure if this is 100% true or not, but with the current implementation a
linked list of wait queues is kept to remove each limit.
parent 5f4eb633
This diff is collapsed.
......@@ -52,7 +52,7 @@ struct file * get_empty_filp(void)
file_list_unlock();
return NULL;
}
ep_init_file_struct(f);
eventpoll_init_file(f);
atomic_set(&f->f_count,1);
f->f_version = 0;
f->f_uid = current->fsuid;
......@@ -97,7 +97,7 @@ struct file * get_empty_filp(void)
int init_private_file(struct file *filp, struct dentry *dentry, int mode)
{
memset(filp, 0, sizeof(*filp));
ep_init_file_struct(filp);
eventpoll_init_file(filp);
filp->f_mode = mode;
atomic_set(&filp->f_count, 1);
filp->f_dentry = dentry;
......@@ -126,10 +126,10 @@ void __fput(struct file * file)
struct inode * inode = dentry->d_inode;
/*
* The function ep_notify_file_close() should be the first called
* The function eventpoll_release() should be the first called
* in the file cleanup chain.
*/
ep_notify_file_close(file);
eventpoll_release(file);
locks_remove_flock(file);
if (file->f_op && file->f_op->release)
......
......@@ -35,10 +35,10 @@ asmlinkage int sys_epoll_wait(int epfd, struct pollfd *events, int maxevents,
int timeout);
/* Used to initialize the epoll bits inside the "struct file" */
void ep_init_file_struct(struct file *file);
void eventpoll_init_file(struct file *file);
/* Used in fs/file_table.c:__fput() to unlink files from the eventpoll interface */
void ep_notify_file_close(struct file *file);
void eventpoll_release(struct file *file);
#endif /* #ifdef __KERNEL__ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment