git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
xenbus: avoid zero returns from read()
[pandora-kernel.git]
/
drivers
/
xen
/
xenfs
/
xenbus.c
diff --git
a/drivers/xen/xenfs/xenbus.c
b/drivers/xen/xenfs/xenbus.c
index
c4c7db8
..
55791dd
100644
(file)
--- a/
drivers/xen/xenfs/xenbus.c
+++ b/
drivers/xen/xenfs/xenbus.c
@@
-120,6
+120,7
@@
static ssize_t xenbus_file_read(struct file *filp,
int ret;
mutex_lock(&u->reply_mutex);
+again:
while (list_empty(&u->read_buffers)) {
mutex_unlock(&u->reply_mutex);
if (filp->f_flags & O_NONBLOCK)
@@
-158,6
+159,8
@@
static ssize_t xenbus_file_read(struct file *filp,
struct read_buffer, list);
}
}
+ if (i == 0)
+ goto again;
out:
mutex_unlock(&u->reply_mutex);