Re: [PATCH] AFS: Use patched rxrpc_kernel_send_data() correctly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Thu, 19 Jul 2007, David Howells wrote:
>
> @@ -806,8 +807,9 @@ void afs_send_simple_reply(struct afs_call *call, const void *buf, size_t len)
>  	msg.msg_flags		= 0;
>  
>  	call->state = AFS_CALL_AWAIT_ACK;
> -	switch (rxrpc_kernel_send_data(call->rxcall, &msg, len)) {
> -	case 0:
> +	n = rxrpc_kernel_send_data(call->rxcall, &msg, len);
> +	switch (n) {
> +	case 0 ... INT_MAX:
>  		_leave(" [replied]");
>  		return;

Please don't do this. There's no reason to. Why not just use the much 
simpler

	if (n >= 0) {
		_leave(" [replied]");
		return;
	}
	if (n == -ENOMEM) {
		_debug("oom");
		rxrpc_kernel_abort_call(call->rxcall, RX_USER_ABORT);
	}

rather than have a silly and totally pointless case-statement with three 
really odd cases?

			Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux