summaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4state.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2012-11-23 13:09:38 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-12-06 00:30:44 +0100
commit5d63360dd8daffc2bc86531e9a44ff9d4881b102 (patch)
tree6fdad98cdfbbe3830d8cc3679c435ed8c8be0606 /fs/nfs/nfs4state.c
parent69d206b5b39e298755b60e8e7056cb240182eb95 (diff)
downloadblackbird-op-linux-5d63360dd8daffc2bc86531e9a44ff9d4881b102.tar.gz
blackbird-op-linux-5d63360dd8daffc2bc86531e9a44ff9d4881b102.zip
NFSv4.1: Clean up session draining
Coalesce nfs4_check_drain_bc_complete and nfs4_check_drain_fc_complete into a single function that can be called when the slot table is known to be empty, then change nfs4_callback_free_slot() and nfs4_free_slot() to use it. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4state.c')
-rw-r--r--fs/nfs/nfs4state.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index 896be2126f7e..1fb3e6c6f993 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -271,6 +271,16 @@ static void nfs4_end_drain_session(struct nfs_client *clp)
}
}
+/*
+ * Signal state manager thread if session fore channel is drained
+ */
+void nfs4_session_drain_complete(struct nfs4_session *session,
+ struct nfs4_slot_table *tbl)
+{
+ if (nfs4_session_draining(session))
+ complete(&tbl->complete);
+}
+
static int nfs4_wait_on_slot_tbl(struct nfs4_slot_table *tbl)
{
spin_lock(&tbl->slot_tbl_lock);
OpenPOWER on IntegriCloud