Skip to content

Commit c9f10f8

Browse files
neilbrownchucklever
authored andcommitted
nfsd: move nfsd_pool_stats_open into nfsctl.c
nfsd_pool_stats_open() is used in nfsctl.c, so move it there. Signed-off-by: NeilBrown <[email protected]> Signed-off-by: Chuck Lever <[email protected]>
1 parent f2b27e1 commit c9f10f8

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

fs/nfsd/nfsctl.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,13 @@ static int export_features_show(struct seq_file *m, void *v)
174174

175175
DEFINE_SHOW_ATTRIBUTE(export_features);
176176

177+
static int nfsd_pool_stats_open(struct inode *inode, struct file *file)
178+
{
179+
struct nfsd_net *nn = net_generic(inode->i_sb->s_fs_info, nfsd_net_id);
180+
181+
return svc_pool_stats_open(&nn->nfsd_info, file);
182+
}
183+
177184
static const struct file_operations pool_stats_operations = {
178185
.open = nfsd_pool_stats_open,
179186
.read = seq_read,

fs/nfsd/nfsd.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,6 @@ int nfsd_nrthreads(struct net *);
111111
int nfsd_nrpools(struct net *);
112112
int nfsd_get_nrthreads(int n, int *, struct net *);
113113
int nfsd_set_nrthreads(int n, int *, struct net *);
114-
int nfsd_pool_stats_open(struct inode *, struct file *);
115-
int nfsd_pool_stats_release(struct inode *, struct file *);
116114
void nfsd_shutdown_threads(struct net *net);
117115

118116
bool i_am_nfsd(void);

fs/nfsd/nfssvc.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1084,10 +1084,3 @@ bool nfssvc_encode_voidres(struct svc_rqst *rqstp, struct xdr_stream *xdr)
10841084
{
10851085
return true;
10861086
}
1087-
1088-
int nfsd_pool_stats_open(struct inode *inode, struct file *file)
1089-
{
1090-
struct nfsd_net *nn = net_generic(inode->i_sb->s_fs_info, nfsd_net_id);
1091-
1092-
return svc_pool_stats_open(&nn->nfsd_info, file);
1093-
}

0 commit comments

Comments
 (0)