fs: add new vfs_poll and file_can_poll helpers

These abstract out calls to the poll method in preparation for changes
in how we poll.

Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Greg Kroah-Hartman <[email protected]>
Reviewed-by: Darrick J. Wong <[email protected]>
This commit is contained in:
Christoph Hellwig 2018-03-05 07:26:05 -08:00
commit 9965ed174e
9 changed files with 32 additions and 38 deletions

View file

@ -3849,7 +3849,7 @@ static ssize_t memcg_write_event_control(struct kernfs_open_file *of,
if (ret)
goto out_put_css;
efile.file->f_op->poll(efile.file, &event->pt);
vfs_poll(efile.file, &event->pt);
spin_lock(&memcg->event_list_lock);
list_add(&event->list, &memcg->event_list);