On Dec 13, 2007, at 4:33 PM, J. Bruce Fields wrote:
On Wed, Dec 12, 2007 at 01:10:17PM -0500, Chuck Lever wrote:
On Dec 11, 2007, at 6:32 PM, Tom Tucker wrote:
+       required = atomic_read(&svsk->sk_reserved) + serv->sv_max_mesg;
+       wspace = sk_stream_wspace(svsk->sk_sk);
+
+       if (wspace < sk_stream_min_wspace(svsk->sk_sk))
+               return 0;
+       if (required * 2 > wspace)
+               return 0;

Since "required" is an int, this test can behave differently than the one
it replaces.

If sk_reserved can approach half of 2^31, for example, then surely we
have bigger problems?


What stops sk_reserved from going negative?

--
Chuck Lever
chuck[dot]lever[at]oracle[dot]com
-
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to