Merge tag 'nfs-for-6.8-1' of git://git.linux-nfs.org/projects/anna/linux-nfs
[sfrench/cifs-2.6.git] / include / linux / sunrpc / svc.h
index 3331a1c2b47e649a1a0e95fd377aba92abce24c5..67cf1c9efd809b17243d64453cff4dc8f624b14f 100644 (file)
@@ -69,7 +69,6 @@ struct svc_serv {
        struct svc_program *    sv_program;     /* RPC program */
        struct svc_stat *       sv_stats;       /* RPC statistics */
        spinlock_t              sv_lock;
-       struct kref             sv_refcnt;
        unsigned int            sv_nrthreads;   /* # of server threads */
        unsigned int            sv_maxconn;     /* max connections allowed or
                                                 * '0' causing max to be based
@@ -97,31 +96,13 @@ struct svc_serv {
 #endif /* CONFIG_SUNRPC_BACKCHANNEL */
 };
 
-/**
- * svc_get() - increment reference count on a SUNRPC serv
- * @serv:  the svc_serv to have count incremented
- *
- * Returns: the svc_serv that was passed in.
- */
-static inline struct svc_serv *svc_get(struct svc_serv *serv)
-{
-       kref_get(&serv->sv_refcnt);
-       return serv;
-}
-
-void svc_destroy(struct kref *);
+/* This is used by pool_stats to find and lock an svc */
+struct svc_info {
+       struct svc_serv         *serv;
+       struct mutex            *mutex;
+};
 
-/**
- * svc_put - decrement reference count on a SUNRPC serv
- * @serv:  the svc_serv to have count decremented
- *
- * When the reference count reaches zero, svc_destroy()
- * is called to clean up and free the serv.
- */
-static inline void svc_put(struct svc_serv *serv)
-{
-       kref_put(&serv->sv_refcnt, svc_destroy);
-}
+void svc_destroy(struct svc_serv **svcp);
 
 /*
  * Maximum payload size supported by a kernel RPC server.
@@ -262,8 +243,6 @@ enum {
        RQ_LOCAL,               /* local request */
        RQ_USEDEFERRAL,         /* use deferral */
        RQ_DROPME,              /* drop current reply */
-       RQ_SPLICE_OK,           /* turned off in gss privacy to prevent
-                                * encrypting page cache pages */
        RQ_VICTIM,              /* Have agreed to shut down */
        RQ_DATA,                /* request has data */
 };
@@ -435,7 +414,7 @@ void                   svc_exit_thread(struct svc_rqst *);
 struct svc_serv *  svc_create_pooled(struct svc_program *, unsigned int,
                                     int (*threadfn)(void *data));
 int               svc_set_num_threads(struct svc_serv *, struct svc_pool *, int);
-int               svc_pool_stats_open(struct svc_serv *serv, struct file *file);
+int               svc_pool_stats_open(struct svc_info *si, struct file *file);
 void              svc_process(struct svc_rqst *rqstp);
 void              svc_process_bc(struct rpc_rqst *req, struct svc_rqst *rqstp);
 int               svc_register(const struct svc_serv *, struct net *, const int,