mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-15 21:23:23 +00:00
orangefs: ->poll() is only called between successful ->open() and ->release()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
This commit is contained in:
parent
fb6d2526e9
commit
83595db052
@ -966,14 +966,12 @@ static unsigned int orangefs_devreq_poll(struct file *file,
|
|||||||
{
|
{
|
||||||
int poll_revent_mask = 0;
|
int poll_revent_mask = 0;
|
||||||
|
|
||||||
if (open_access_count == 1) {
|
poll_wait(file, &orangefs_request_list_waitq, poll_table);
|
||||||
poll_wait(file, &orangefs_request_list_waitq, poll_table);
|
|
||||||
|
|
||||||
spin_lock(&orangefs_request_list_lock);
|
spin_lock(&orangefs_request_list_lock);
|
||||||
if (!list_empty(&orangefs_request_list))
|
if (!list_empty(&orangefs_request_list))
|
||||||
poll_revent_mask |= POLL_IN;
|
poll_revent_mask |= POLL_IN;
|
||||||
spin_unlock(&orangefs_request_list_lock);
|
spin_unlock(&orangefs_request_list_lock);
|
||||||
}
|
|
||||||
return poll_revent_mask;
|
return poll_revent_mask;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user