diff options
author | Jim Garlick <garlick@llnl.gov> | 2012-02-01 21:48:53 +0100 |
---|---|---|
committer | Eric Van Hensbergen <ericvh@gmail.com> | 2012-02-26 21:27:21 +0100 |
commit | a314f2748e76c866222a18e639c640d584d277fb (patch) | |
tree | c81f5c6cf3b509c48c1b599885b7f7359c31f74e /net | |
parent | Fix autofs compile without CONFIG_COMPAT (diff) | |
download | linux-a314f2748e76c866222a18e639c640d584d277fb.tar.xz linux-a314f2748e76c866222a18e639c640d584d277fb.zip |
net/9p: don't allow Tflush to be interrupted
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>
Diffstat (limited to 'net')
-rw-r--r-- | net/9p/client.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/9p/client.c b/net/9p/client.c index 776618cd2be5..6efbb334c3ad 100644 --- a/net/9p/client.c +++ b/net/9p/client.c @@ -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; |