diff options
Diffstat (limited to 'fs/afs/rxrpc.c')
-rw-r--r-- | fs/afs/rxrpc.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/fs/afs/rxrpc.c b/fs/afs/rxrpc.c index 9226a6674d7f..1a1110b1a7ff 100644 --- a/fs/afs/rxrpc.c +++ b/fs/afs/rxrpc.c | |||
@@ -184,15 +184,24 @@ static void afs_free_call(struct afs_call *call) | |||
184 | } | 184 | } |
185 | 185 | ||
186 | /* | 186 | /* |
187 | * End a call | 187 | * End a call but do not free it |
188 | */ | 188 | */ |
189 | static void afs_end_call(struct afs_call *call) | 189 | static void afs_end_call_nofree(struct afs_call *call) |
190 | { | 190 | { |
191 | if (call->rxcall) { | 191 | if (call->rxcall) { |
192 | rxrpc_kernel_end_call(call->rxcall); | 192 | rxrpc_kernel_end_call(call->rxcall); |
193 | call->rxcall = NULL; | 193 | call->rxcall = NULL; |
194 | } | 194 | } |
195 | call->type->destructor(call); | 195 | if (call->type->destructor) |
196 | call->type->destructor(call); | ||
197 | } | ||
198 | |||
199 | /* | ||
200 | * End a call and free it | ||
201 | */ | ||
202 | static void afs_end_call(struct afs_call *call) | ||
203 | { | ||
204 | afs_end_call_nofree(call); | ||
196 | afs_free_call(call); | 205 | afs_free_call(call); |
197 | } | 206 | } |
198 | 207 | ||
@@ -640,10 +649,7 @@ static void afs_process_async_call(struct work_struct *work) | |||
640 | call->reply = NULL; | 649 | call->reply = NULL; |
641 | 650 | ||
642 | /* kill the call */ | 651 | /* kill the call */ |
643 | rxrpc_kernel_end_call(call->rxcall); | 652 | afs_end_call_nofree(call); |
644 | call->rxcall = NULL; | ||
645 | if (call->type->destructor) | ||
646 | call->type->destructor(call); | ||
647 | 653 | ||
648 | /* we can't just delete the call because the work item may be | 654 | /* we can't just delete the call because the work item may be |
649 | * queued */ | 655 | * queued */ |