diff options
author | Andy Adamson <andros@netapp.com> | 2013-06-19 16:39:44 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2013-06-20 10:19:21 -0400 |
commit | 62f288a02f97bd9f6b2361a6fff709729fe9e110 (patch) | |
tree | e31c125128ac6353e1a755e1a01999f5084d8393 /fs/nfs | |
parent | 7dc0ac70f89d4281094aaa82cab1cb995f298287 (diff) |
NFSv4.1 end back channel session draining
We need to ensure that we clear NFS4_SLOT_TBL_DRAINING on the back
channel when we're done recovering the session.
Regression introduced by commit 774d5f14e (NFSv4.1 Fix a pNFS session
draining deadlock)
Signed-off-by: Andy Adamson <andros@netapp.com>
[Trond: Changed order to start back-channel first. Minor code cleanup]
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: stable@vger.kernel.org [>=3.10]
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/nfs4state.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index 5244ffd304e8..b0e42d7a19a1 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c | |||
@@ -228,19 +228,8 @@ static int nfs41_setup_state_renewal(struct nfs_client *clp) | |||
228 | return status; | 228 | return status; |
229 | } | 229 | } |
230 | 230 | ||
231 | /* | 231 | static void nfs4_end_drain_slot_table(struct nfs4_slot_table *tbl) |
232 | * Back channel returns NFS4ERR_DELAY for new requests when | ||
233 | * NFS4_SESSION_DRAINING is set so there is no work to be done when draining | ||
234 | * is ended. | ||
235 | */ | ||
236 | static void nfs4_end_drain_session(struct nfs_client *clp) | ||
237 | { | 232 | { |
238 | struct nfs4_session *ses = clp->cl_session; | ||
239 | struct nfs4_slot_table *tbl; | ||
240 | |||
241 | if (ses == NULL) | ||
242 | return; | ||
243 | tbl = &ses->fc_slot_table; | ||
244 | if (test_and_clear_bit(NFS4_SLOT_TBL_DRAINING, &tbl->slot_tbl_state)) { | 233 | if (test_and_clear_bit(NFS4_SLOT_TBL_DRAINING, &tbl->slot_tbl_state)) { |
245 | spin_lock(&tbl->slot_tbl_lock); | 234 | spin_lock(&tbl->slot_tbl_lock); |
246 | nfs41_wake_slot_table(tbl); | 235 | nfs41_wake_slot_table(tbl); |
@@ -248,6 +237,16 @@ static void nfs4_end_drain_session(struct nfs_client *clp) | |||
248 | } | 237 | } |
249 | } | 238 | } |
250 | 239 | ||
240 | static void nfs4_end_drain_session(struct nfs_client *clp) | ||
241 | { | ||
242 | struct nfs4_session *ses = clp->cl_session; | ||
243 | |||
244 | if (ses != NULL) { | ||
245 | nfs4_end_drain_slot_table(&ses->bc_slot_table); | ||
246 | nfs4_end_drain_slot_table(&ses->fc_slot_table); | ||
247 | } | ||
248 | } | ||
249 | |||
251 | /* | 250 | /* |
252 | * Signal state manager thread if session fore channel is drained | 251 | * Signal state manager thread if session fore channel is drained |
253 | */ | 252 | */ |