summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@citi.umich.edu>2007-11-06 13:05:36 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2007-11-17 13:08:47 -0500
commiteda4f9b7996e5520934ca2a7310b363463a4e3b0 (patch)
tree73e4e051a8c0cc0e2e7d389f64888992d33f421e /net
parentef338bee3f4f509e82066e100f76fecbbbbc4cca (diff)
sunrpc: rpc_pipe_poll may miss available data in some cases
Pipe messages start out life on a queue on the inode, but when first read they're moved to the filp's private pointer. So it's possible for a poll here to return null even though there's a partially read message available. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net')
-rw-r--r--net/sunrpc/rpc_pipe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c
index 18f0a8dcc09..c59f3ca2b41 100644
--- a/net/sunrpc/rpc_pipe.c
+++ b/net/sunrpc/rpc_pipe.c
@@ -280,7 +280,7 @@ rpc_pipe_poll(struct file *filp, struct poll_table_struct *wait)
mask = POLLOUT | POLLWRNORM;
if (rpci->ops == NULL)
mask |= POLLERR | POLLHUP;
- if (!list_empty(&rpci->pipe))
+ if (filp->private_data || !list_empty(&rpci->pipe))
mask |= POLLIN | POLLRDNORM;
return mask;
}