Skip to content

Commit

Permalink
nfsd: move nfsd_pool_stats_open into nfsctl.c
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
neilbrown authored and chucklever committed Sep 1, 2024
1 parent f2b27e1 commit c9f10f8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
7 changes: 7 additions & 0 deletions fs/nfsd/nfsctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 0 additions & 2 deletions fs/nfsd/nfsd.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
7 changes: 0 additions & 7 deletions fs/nfsd/nfssvc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

0 comments on commit c9f10f8

Please sign in to comment.