]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
net/9p: don't allow Tflush to be interrupted
authorJim Garlick <garlick@llnl.gov>
Wed, 1 Feb 2012 20:48:53 +0000 (12:48 -0800)
committerEric Van Hensbergen <ericvh@gmail.com>
Sun, 26 Feb 2012 20:27:21 +0000 (14:27 -0600)
When a signal is received while sending a Tflush, the client,
which has recursed into p9_client_rpc() while sending another request,
should wait for Rflush as long as the transport is still up.

Signed-off-by: Jim Garlick <garlick@llnl.gov>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
net/9p/client.c

index 776618cd2be5c122fecaf31934f06d74fff2b450..6efbb334c3ad786dffab48462852ef2d2de5b414 100644 (file)
@@ -740,10 +740,18 @@ p9_client_rpc(struct p9_client *c, int8_t type, const char *fmt, ...)
                        c->status = Disconnected;
                goto reterr;
        }
+again:
        /* Wait for the response */
        err = wait_event_interruptible(*req->wq,
                                       req->status >= REQ_STATUS_RCVD);
 
+       if ((err == -ERESTARTSYS) && (c->status == Connected)
+                                 && (type == P9_TFLUSH)) {
+               sigpending = 1;
+               clear_thread_flag(TIF_SIGPENDING);
+               goto again;
+       }
+
        if (req->status == REQ_STATUS_ERROR) {
                p9_debug(P9_DEBUG_ERROR, "req_status error %d\n", req->t_err);
                err = req->t_err;