diff options
author | Benny Halevy <bhalevy@panasas.com> | 2010-05-11 17:14:06 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@citi.umich.edu> | 2010-05-13 11:59:11 -0400 |
commit | ab707e156593ff7fffd615757332dbff6616836a (patch) | |
tree | a9d1c7d851ca178e616f05aab30377ab778762b4 /fs/nfsd/nfs4state.c | |
parent | d76829889ac4250a18cfcc1a606bb256bb9c570c (diff) |
nfsd4: nfsd4_destroy_session must set callback client under the state lock
nfsd4_set_callback_client must be called under the state lock to atomically
set or unset the callback client and shutting down the previous one.
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'fs/nfsd/nfs4state.c')
-rw-r--r-- | fs/nfsd/nfs4state.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index cc0e9117dd16..ede9dde52fe8 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c | |||
@@ -1427,8 +1427,10 @@ nfsd4_destroy_session(struct svc_rqst *r, | |||
1427 | unhash_session(ses); | 1427 | unhash_session(ses); |
1428 | spin_unlock(&client_lock); | 1428 | spin_unlock(&client_lock); |
1429 | 1429 | ||
1430 | nfs4_lock_state(); | ||
1430 | /* wait for callbacks */ | 1431 | /* wait for callbacks */ |
1431 | nfsd4_set_callback_client(ses->se_client, NULL); | 1432 | nfsd4_set_callback_client(ses->se_client, NULL); |
1433 | nfs4_unlock_state(); | ||
1432 | nfsd4_put_session(ses); | 1434 | nfsd4_put_session(ses); |
1433 | status = nfs_ok; | 1435 | status = nfs_ok; |
1434 | out: | 1436 | out: |