aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/client.c
diff options
context:
space:
mode:
authorAndy Adamson <andros@netapp.com>2011-03-01 01:34:10 +0000
committerTrond Myklebust <Trond.Myklebust@netapp.com>2011-03-11 15:38:41 -0500
commitd3b4c9d76738df49a7db7682c2518a0ef9f7391d (patch)
tree69ab2ccad799bee8a00ad901b57739be44747fcd /fs/nfs/client.c
parentNFSv4.1: send zero stateid seqid on v4.1 i/o (diff)
downloadlinux-dev-d3b4c9d76738df49a7db7682c2518a0ef9f7391d.tar.xz
linux-dev-d3b4c9d76738df49a7db7682c2518a0ef9f7391d.zip
NFSv4.1: new flag for state renewal check
Data servers not sharing a session with the mount MDS always have an empty cl_superblocks list. Replace the cl_superblocks empty list check to see if it is time to shut down renewd with the NFS_CS_STOP_RENEW bit which is not set by such a data server. Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/client.c')
-rw-r--r--fs/nfs/client.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index b9ed2a8bc26a..a86698cd82fd 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -1019,14 +1019,19 @@ static void nfs_server_insert_lists(struct nfs_server *server)
spin_lock(&nfs_client_lock);
list_add_tail_rcu(&server->client_link, &clp->cl_superblocks);
list_add_tail(&server->master_link, &nfs_volume_list);
+ clear_bit(NFS_CS_STOP_RENEW, &clp->cl_res_state);
spin_unlock(&nfs_client_lock);
}
static void nfs_server_remove_lists(struct nfs_server *server)
{
+ struct nfs_client *clp = server->nfs_client;
+
spin_lock(&nfs_client_lock);
list_del_rcu(&server->client_link);
+ if (clp && list_empty(&clp->cl_superblocks))
+ set_bit(NFS_CS_STOP_RENEW, &clp->cl_res_state);
list_del(&server->master_link);
spin_unlock(&nfs_client_lock);