orangefs: ->poll() is only called between successful ->open() and ->release()
authorAl Viro <viro@zeniv.linux.org.uk>
Tue, 19 Jan 2016 17:03:05 +0000 (12:03 -0500)
committerMike Marshall <hubcap@omnibond.com>
Sat, 23 Jan 2016 17:42:43 +0000 (12:42 -0500)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
fs/orangefs/devorangefs-req.c

index fb7f092f94ba69fdd8a009806c8e39957ffbfec6..4cecc7c4f76009effc58c7528e239fb7590b63ec 100644 (file)
@@ -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;
 }