Commit:     eda4f9b7996e5520934ca2a7310b363463a4e3b0
Parent:     ef338bee3f4f509e82066e100f76fecbbbbc4cca
Author:     J. Bruce Fields <[EMAIL PROTECTED]>
AuthorDate: Tue Nov 6 13:05:36 2007 -0500
Committer:  Trond Myklebust <[EMAIL PROTECTED]>
CommitDate: Sat Nov 17 13:08:47 2007 -0500

    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
    Signed-off-by: J. Bruce Fields <[EMAIL PROTECTED]>
    Signed-off-by: Trond Myklebust <[EMAIL PROTECTED]>
 net/sunrpc/rpc_pipe.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c
index 18f0a8d..c59f3ca 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 
        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;
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to