diff options
Diffstat (limited to 'fs/nfs/nfs4state.c')
| -rw-r--r-- | fs/nfs/nfs4state.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index e76427e6346f..0e45075836b2 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c | |||
| @@ -138,8 +138,22 @@ static int nfs41_setup_state_renewal(struct nfs_client *clp) | |||
| 138 | static void nfs41_end_drain_session(struct nfs_client *clp, | 138 | static void nfs41_end_drain_session(struct nfs_client *clp, |
| 139 | struct nfs4_session *ses) | 139 | struct nfs4_session *ses) |
| 140 | { | 140 | { |
| 141 | if (test_and_clear_bit(NFS4CLNT_SESSION_DRAINING, &clp->cl_state)) | 141 | int max_slots; |
| 142 | rpc_wake_up(&ses->fc_slot_table.slot_tbl_waitq); | 142 | |
| 143 | if (test_and_clear_bit(NFS4CLNT_SESSION_DRAINING, &clp->cl_state)) { | ||
| 144 | spin_lock(&ses->fc_slot_table.slot_tbl_lock); | ||
| 145 | max_slots = ses->fc_slot_table.max_slots; | ||
| 146 | while (max_slots--) { | ||
| 147 | struct rpc_task *task; | ||
| 148 | |||
| 149 | task = rpc_wake_up_next(&ses->fc_slot_table. | ||
| 150 | slot_tbl_waitq); | ||
| 151 | if (!task) | ||
| 152 | break; | ||
| 153 | rpc_task_set_priority(task, RPC_PRIORITY_PRIVILEGED); | ||
| 154 | } | ||
| 155 | spin_unlock(&ses->fc_slot_table.slot_tbl_lock); | ||
| 156 | } | ||
| 143 | } | 157 | } |
| 144 | 158 | ||
| 145 | static int nfs41_begin_drain_session(struct nfs_client *clp, | 159 | static int nfs41_begin_drain_session(struct nfs_client *clp, |
