diff options
-rw-r--r-- | fs/afs/internal.h | 1 | ||||
-rw-r--r-- | fs/afs/rxrpc.c | 12 |
2 files changed, 11 insertions, 2 deletions
diff --git a/fs/afs/internal.h b/fs/afs/internal.h index 6621f8008122..be75b500005d 100644 --- a/fs/afs/internal.h +++ b/fs/afs/internal.h | |||
@@ -75,6 +75,7 @@ struct afs_call { | |||
75 | const struct afs_call_type *type; /* type of call */ | 75 | const struct afs_call_type *type; /* type of call */ |
76 | const struct afs_wait_mode *wait_mode; /* completion wait mode */ | 76 | const struct afs_wait_mode *wait_mode; /* completion wait mode */ |
77 | wait_queue_head_t waitq; /* processes awaiting completion */ | 77 | wait_queue_head_t waitq; /* processes awaiting completion */ |
78 | work_func_t async_workfn; | ||
78 | struct work_struct async_work; /* asynchronous work processor */ | 79 | struct work_struct async_work; /* asynchronous work processor */ |
79 | struct work_struct work; /* actual work processor */ | 80 | struct work_struct work; /* actual work processor */ |
80 | struct sk_buff_head rx_queue; /* received packets */ | 81 | struct sk_buff_head rx_queue; /* received packets */ |
diff --git a/fs/afs/rxrpc.c b/fs/afs/rxrpc.c index 8ad8c2a0703a..ef943df73b8c 100644 --- a/fs/afs/rxrpc.c +++ b/fs/afs/rxrpc.c | |||
@@ -644,7 +644,7 @@ static void afs_process_async_call(struct work_struct *work) | |||
644 | 644 | ||
645 | /* we can't just delete the call because the work item may be | 645 | /* we can't just delete the call because the work item may be |
646 | * queued */ | 646 | * queued */ |
647 | PREPARE_WORK(&call->async_work, afs_delete_async_call); | 647 | call->async_workfn = afs_delete_async_call; |
648 | queue_work(afs_async_calls, &call->async_work); | 648 | queue_work(afs_async_calls, &call->async_work); |
649 | } | 649 | } |
650 | 650 | ||
@@ -663,6 +663,13 @@ void afs_transfer_reply(struct afs_call *call, struct sk_buff *skb) | |||
663 | call->reply_size += len; | 663 | call->reply_size += len; |
664 | } | 664 | } |
665 | 665 | ||
666 | static void afs_async_workfn(struct work_struct *work) | ||
667 | { | ||
668 | struct afs_call *call = container_of(work, struct afs_call, async_work); | ||
669 | |||
670 | call->async_workfn(work); | ||
671 | } | ||
672 | |||
666 | /* | 673 | /* |
667 | * accept the backlog of incoming calls | 674 | * accept the backlog of incoming calls |
668 | */ | 675 | */ |
@@ -685,7 +692,8 @@ static void afs_collect_incoming_call(struct work_struct *work) | |||
685 | return; | 692 | return; |
686 | } | 693 | } |
687 | 694 | ||
688 | INIT_WORK(&call->async_work, afs_process_async_call); | 695 | call->async_workfn = afs_process_async_call; |
696 | INIT_WORK(&call->async_work, afs_async_workfn); | ||
689 | call->wait_mode = &afs_async_incoming_call; | 697 | call->wait_mode = &afs_async_incoming_call; |
690 | call->type = &afs_RXCMxxxx; | 698 | call->type = &afs_RXCMxxxx; |
691 | init_waitqueue_head(&call->waitq); | 699 | init_waitqueue_head(&call->waitq); |