projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4c31a78
)
implement O_NONBLOCK for /proc/xen/xenbus
author
Paolo Bonzini
<pbonzini@redhat.com>
Wed, 23 Jun 2010 16:30:15 +0000
(18:30 +0200)
committer
Jeremy Fitzhardinge
<jeremy.fitzhardinge@citrix.com>
Mon, 26 Jul 2010 17:05:05 +0000
(10:05 -0700)
This patch implements O_NONBLOCK for /proc/xen/xenbus. It is a simple
matter of returning -EAGAIN instead of waiting on a queue.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
drivers/xen/xenfs/xenbus.c
patch
|
blob
|
history
diff --git
a/drivers/xen/xenfs/xenbus.c
b/drivers/xen/xenfs/xenbus.c
index
a9592d9
..
9d5b519
100644
(file)
--- 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,
mutex_lock(&u->reply_mutex);
while (list_empty(&u->read_buffers)) {
mutex_unlock(&u->reply_mutex);
+ if (filp->f_flags & O_NONBLOCK)
+ return -EAGAIN;
+
ret = wait_event_interruptible(u->read_waitq,
!list_empty(&u->read_buffers));
if (ret)