SUNRPC: stop using ->sv_nrthreads as a refcount
[sfrench/cifs-2.6.git] / fs / nfsd / netns.h
index a75abeb1e69881295e93aa54f7e27f58d33bdfef..08bcd8f23b0139628524a901dae079614f0a66cb 100644 (file)
@@ -123,6 +123,13 @@ struct nfsd_net {
        u32 clverifier_counter;
 
        struct svc_serv *nfsd_serv;
+       /* When a listening socket is added to nfsd, keep_active is set
+        * and this justifies a reference on nfsd_serv.  This stops
+        * nfsd_serv from being freed.  When the number of threads is
+        * set, keep_active is cleared and the reference is dropped.  So
+        * when the last thread exits, the service will be destroyed.
+        */
+       int keep_active;
 
        wait_queue_head_t ntf_wq;
        atomic_t ntf_refcnt;
@@ -176,6 +183,12 @@ struct nfsd_net {
        unsigned int             longest_chain_cachesize;
 
        struct shrinker         nfsd_reply_cache_shrinker;
+
+       /* tracking server-to-server copy mounts */
+       spinlock_t              nfsd_ssc_lock;
+       struct list_head        nfsd_ssc_mount_list;
+       wait_queue_head_t       nfsd_ssc_waitq;
+
        /* utsname taken from the process that starts the server */
        char                    nfsd_name[UNX_MAXNODENAME+1];
 };