diff options
author | J. Bruce Fields <bfields@redhat.com> | 2013-10-30 10:33:09 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2013-10-30 10:35:59 -0400 |
commit | e50a26dc785f12a6df1f1ac16d62faf0342b72af (patch) | |
tree | 72b2520bd8e298cbd789522e370dea5d30a59180 /fs/nfsd | |
parent | e1a90ebd8b2349eb00ec22f0b8bf6ab8bbd06cc8 (diff) | |
download | linux-e50a26dc785f12a6df1f1ac16d62faf0342b72af.tar.bz2 |
nfsd4: nfsd_shutdown_net needs state lock
A comment claims the caller should take it, but that's not being done.
Note we don't want it around the cancel_delayed_work_sync since that may
wait on work which holds the client lock.
Reported-by: Benny Halevy <bhalevy@primarydata.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd')
-rw-r--r-- | fs/nfsd/nfs4state.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 21eb6788cb33..e03e8efff53f 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -5124,7 +5124,6 @@ out_recovery: return ret; } -/* should be called with the state lock held */ void nfs4_state_shutdown_net(struct net *net) { @@ -5135,6 +5134,7 @@ nfs4_state_shutdown_net(struct net *net) cancel_delayed_work_sync(&nn->laundromat_work); locks_end_grace(&nn->nfsd4_manager); + nfs4_lock_state(); INIT_LIST_HEAD(&reaplist); spin_lock(&recall_lock); list_for_each_safe(pos, next, &nn->del_recall_lru) { @@ -5149,6 +5149,7 @@ nfs4_state_shutdown_net(struct net *net) nfsd4_client_tracking_exit(net); nfs4_state_destroy_net(net); + nfs4_unlock_state(); } void |