diff options
Diffstat (limited to 'include/linux/poll.h')
-rw-r--r-- | include/linux/poll.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/linux/poll.h b/include/linux/poll.h index fdf86b4cbc71..7e0fdcf905d2 100644 --- a/include/linux/poll.h +++ b/include/linux/poll.h | |||
@@ -74,18 +74,18 @@ static inline void init_poll_funcptr(poll_table *pt, poll_queue_proc qproc) | |||
74 | pt->_key = ~(__poll_t)0; /* all events enabled */ | 74 | pt->_key = ~(__poll_t)0; /* all events enabled */ |
75 | } | 75 | } |
76 | 76 | ||
77 | static inline bool file_has_poll_mask(struct file *file) | 77 | static inline bool file_can_poll(struct file *file) |
78 | { | 78 | { |
79 | return file->f_op->get_poll_head && file->f_op->poll_mask; | 79 | return file->f_op->poll; |
80 | } | 80 | } |
81 | 81 | ||
82 | static inline bool file_can_poll(struct file *file) | 82 | static inline __poll_t vfs_poll(struct file *file, struct poll_table_struct *pt) |
83 | { | 83 | { |
84 | return file->f_op->poll || file_has_poll_mask(file); | 84 | if (unlikely(!file->f_op->poll)) |
85 | return DEFAULT_POLLMASK; | ||
86 | return file->f_op->poll(file, pt); | ||
85 | } | 87 | } |
86 | 88 | ||
87 | __poll_t vfs_poll(struct file *file, struct poll_table_struct *pt); | ||
88 | |||
89 | struct poll_table_entry { | 89 | struct poll_table_entry { |
90 | struct file *filp; | 90 | struct file *filp; |
91 | __poll_t key; | 91 | __poll_t key; |