]> www.infradead.org Git - users/hch/misc.git/commitdiff
nfsd: move nfsd_pool_stats_open into nfsctl.c
authorNeilBrown <neilb@suse.de>
Mon, 15 Jul 2024 07:14:16 +0000 (17:14 +1000)
committerChuck Lever <chuck.lever@oracle.com>
Sun, 1 Sep 2024 14:04:57 +0000 (10:04 -0400)
nfsd_pool_stats_open() is used in nfsctl.c, so move it there.

Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/nfsd/nfsctl.c
fs/nfsd/nfsd.h
fs/nfsd/nfssvc.c

index 34eb2c2cbcde34377a347efe7a5e2dbffe552053..97c8c76b241b7cc7a516cf58329eb24f963aa1ca 100644 (file)
@@ -174,6 +174,13 @@ static int export_features_show(struct seq_file *m, void *v)
 
 DEFINE_SHOW_ATTRIBUTE(export_features);
 
+static int nfsd_pool_stats_open(struct inode *inode, struct file *file)
+{
+       struct nfsd_net *nn = net_generic(inode->i_sb->s_fs_info, nfsd_net_id);
+
+       return svc_pool_stats_open(&nn->nfsd_info, file);
+}
+
 static const struct file_operations pool_stats_operations = {
        .open           = nfsd_pool_stats_open,
        .read           = seq_read,
index cec8697b1cd624ca00bd6a4e063bc79d4833fe9c..39e109a7d56dca7a76f959ce4ab700fd9d471905 100644 (file)
@@ -111,8 +111,6 @@ int         nfsd_nrthreads(struct net *);
 int            nfsd_nrpools(struct net *);
 int            nfsd_get_nrthreads(int n, int *, struct net *);
 int            nfsd_set_nrthreads(int n, int *, struct net *);
-int            nfsd_pool_stats_open(struct inode *, struct file *);
-int            nfsd_pool_stats_release(struct inode *, struct file *);
 void           nfsd_shutdown_threads(struct net *net);
 
 bool           i_am_nfsd(void);
index 0bc8eaa5e0098eeb69133ee44e0577bd61c9e1ad..f25b26bc5670db380b5c055a2dc5a8fcd2f5449c 100644 (file)
@@ -1084,10 +1084,3 @@ bool nfssvc_encode_voidres(struct svc_rqst *rqstp, struct xdr_stream *xdr)
 {
        return true;
 }
-
-int nfsd_pool_stats_open(struct inode *inode, struct file *file)
-{
-       struct nfsd_net *nn = net_generic(inode->i_sb->s_fs_info, nfsd_net_id);
-
-       return svc_pool_stats_open(&nn->nfsd_info, file);
-}