summaryrefslogtreecommitdiffstats
path: root/fs/orangefs/devorangefs-req.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2016-01-19 12:03:05 -0500
committerMike Marshall <hubcap@omnibond.com>2016-01-23 12:42:43 -0500
commit83595db05214eb49477b2ffb7d18ce4e7468c776 (patch)
tree3e6c862d437ae6212bee5206a09cdf6512b308e5 /fs/orangefs/devorangefs-req.c
parentfb6d2526e92e56d3f41bfec45daf1ce09dd59e7b (diff)
downloadlinux-83595db05214eb49477b2ffb7d18ce4e7468c776.tar.bz2
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>
Diffstat (limited to 'fs/orangefs/devorangefs-req.c')
-rw-r--r--fs/orangefs/devorangefs-req.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/fs/orangefs/devorangefs-req.c b/fs/orangefs/devorangefs-req.c
index fb7f092f94ba..4cecc7c4f760 100644
--- a/fs/orangefs/devorangefs-req.c
+++ b/fs/orangefs/devorangefs-req.c
@@ -966,14 +966,12 @@ static unsigned int orangefs_devreq_poll(struct file *file,
{
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);
- if (!list_empty(&orangefs_request_list))
- poll_revent_mask |= POLL_IN;
- spin_unlock(&orangefs_request_list_lock);
- }
+ spin_lock(&orangefs_request_list_lock);
+ if (!list_empty(&orangefs_request_list))
+ poll_revent_mask |= POLL_IN;
+ spin_unlock(&orangefs_request_list_lock);
return poll_revent_mask;
}