diff options
-rw-r--r-- | fs/afs/rxrpc.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/fs/afs/rxrpc.c b/fs/afs/rxrpc.c index 1b36f45076ad..8ccee9ee1d9d 100644 --- a/fs/afs/rxrpc.c +++ b/fs/afs/rxrpc.c | |||
@@ -792,6 +792,7 @@ void afs_send_simple_reply(struct afs_call *call, const void *buf, size_t len) | |||
792 | { | 792 | { |
793 | struct msghdr msg; | 793 | struct msghdr msg; |
794 | struct iovec iov[1]; | 794 | struct iovec iov[1]; |
795 | int n; | ||
795 | 796 | ||
796 | _enter(""); | 797 | _enter(""); |
797 | 798 | ||
@@ -806,22 +807,20 @@ void afs_send_simple_reply(struct afs_call *call, const void *buf, size_t len) | |||
806 | msg.msg_flags = 0; | 807 | msg.msg_flags = 0; |
807 | 808 | ||
808 | call->state = AFS_CALL_AWAIT_ACK; | 809 | call->state = AFS_CALL_AWAIT_ACK; |
809 | switch (rxrpc_kernel_send_data(call->rxcall, &msg, len)) { | 810 | n = rxrpc_kernel_send_data(call->rxcall, &msg, len); |
810 | case 0: | 811 | if (n >= 0) { |
811 | _leave(" [replied]"); | 812 | _leave(" [replied]"); |
812 | return; | 813 | return; |
813 | 814 | } | |
814 | case -ENOMEM: | 815 | if (n == -ENOMEM) { |
815 | _debug("oom"); | 816 | _debug("oom"); |
816 | rxrpc_kernel_abort_call(call->rxcall, RX_USER_ABORT); | 817 | rxrpc_kernel_abort_call(call->rxcall, RX_USER_ABORT); |
817 | default: | ||
818 | rxrpc_kernel_end_call(call->rxcall); | ||
819 | call->rxcall = NULL; | ||
820 | call->type->destructor(call); | ||
821 | afs_free_call(call); | ||
822 | _leave(" [error]"); | ||
823 | return; | ||
824 | } | 818 | } |
819 | rxrpc_kernel_end_call(call->rxcall); | ||
820 | call->rxcall = NULL; | ||
821 | call->type->destructor(call); | ||
822 | afs_free_call(call); | ||
823 | _leave(" [error]"); | ||
825 | } | 824 | } |
826 | 825 | ||
827 | /* | 826 | /* |