SUNRPC: Ensure we return EAGAIN in xs_nospace if congestion is cleared
commit421f55945fb8515c6f322d20e9b0a2d390235e05
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Tue, 22 Nov 2011 12:44:28 +0000 (22 14:44 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 9 Dec 2011 16:52:27 +0000 (9 08:52 -0800)
tree7d474b15f2c48fdb9cd8d9887907210294c6cc4a
parent6dbe15f453482a897c3db411cfdcffef27e71c6c
SUNRPC: Ensure we return EAGAIN in xs_nospace if congestion is cleared

commit 24ca9a847791fd53d9b217330b15f3c285827a18 upstream.

By returning '0' instead of 'EAGAIN' when the tests in xs_nospace() fail
to find evidence of socket congestion, we are making the RPC engine believe
that the message was incorrectly sent and so it disconnects the socket
instead of just retrying.

The bug appears to have been introduced by commit
5e3771ce2d6a69e10fcc870cdf226d121d868491 (SUNRPC: Ensure that xs_nospace
return values are propagated).

Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Tested-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/sunrpc/xprtsock.c