From 83595db05214eb49477b2ffb7d18ce4e7468c776 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 19 Jan 2016 12:03:05 -0500 Subject: [PATCH] orangefs: ->poll() is only called between successful ->open() and ->release() Signed-off-by: Al Viro Signed-off-by: Mike Marshall --- fs/orangefs/devorangefs-req.c | 12 +++++------- 1 file 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; } -- 2.39.5