diff options
| -rw-r--r-- | drivers/xen/xenfs/xenbus.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/xen/xenfs/xenbus.c b/drivers/xen/xenfs/xenbus.c index a9592d981b10..9d5b519d2e4c 100644 --- a/drivers/xen/xenfs/xenbus.c +++ b/drivers/xen/xenfs/xenbus.c | |||
| @@ -122,6 +122,9 @@ static ssize_t xenbus_file_read(struct file *filp, | |||
| 122 | mutex_lock(&u->reply_mutex); | 122 | mutex_lock(&u->reply_mutex); |
| 123 | while (list_empty(&u->read_buffers)) { | 123 | while (list_empty(&u->read_buffers)) { |
| 124 | mutex_unlock(&u->reply_mutex); | 124 | mutex_unlock(&u->reply_mutex); |
| 125 | if (filp->f_flags & O_NONBLOCK) | ||
| 126 | return -EAGAIN; | ||
| 127 | |||
| 125 | ret = wait_event_interruptible(u->read_waitq, | 128 | ret = wait_event_interruptible(u->read_waitq, |
| 126 | !list_empty(&u->read_buffers)); | 129 | !list_empty(&u->read_buffers)); |
| 127 | if (ret) | 130 | if (ret) |
