Skip to content

Commit 2ee3a75

Browse files
neilbrownchucklever
authored andcommitted
nfsd: discard nfsd_file_get_local()
This interface was deprecated by commit e6f7e14 ("nfs_localio: simplify interface to nfsd for getting nfsd_file") and is now unused. So let's remove it. Signed-off-by: NeilBrown <neil@brown.name> Reviewed-by: Mike Snitzer <snitzer@kernel.org> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
1 parent d9adbb6 commit 2ee3a75

4 files changed

Lines changed: 0 additions & 24 deletions

File tree

fs/nfsd/filecache.c

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -391,27 +391,6 @@ nfsd_file_put_local(struct nfsd_file __rcu **pnf)
391391
return net;
392392
}
393393

394-
/**
395-
* nfsd_file_get_local - get nfsd_file reference and reference to net
396-
* @nf: nfsd_file of which to put the reference
397-
*
398-
* Get reference to both the nfsd_file and nf->nf_net.
399-
*/
400-
struct nfsd_file *
401-
nfsd_file_get_local(struct nfsd_file *nf)
402-
{
403-
struct net *net = nf->nf_net;
404-
405-
if (nfsd_net_try_get(net)) {
406-
nf = nfsd_file_get(nf);
407-
if (!nf)
408-
nfsd_net_put(net);
409-
} else {
410-
nf = NULL;
411-
}
412-
return nf;
413-
}
414-
415394
/**
416395
* nfsd_file_file - get the backing file of an nfsd_file
417396
* @nf: nfsd_file of which to access the backing file.

fs/nfsd/filecache.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ int nfsd_file_cache_start_net(struct net *net);
6363
void nfsd_file_cache_shutdown_net(struct net *net);
6464
void nfsd_file_put(struct nfsd_file *nf);
6565
struct net *nfsd_file_put_local(struct nfsd_file __rcu **nf);
66-
struct nfsd_file *nfsd_file_get_local(struct nfsd_file *nf);
6766
struct nfsd_file *nfsd_file_get(struct nfsd_file *nf);
6867
struct file *nfsd_file_file(struct nfsd_file *nf);
6968
void nfsd_file_close_inode_sync(struct inode *inode);

fs/nfsd/localio.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ static const struct nfsd_localio_operations nfsd_localio_ops = {
122122
.nfsd_net_put = nfsd_net_put,
123123
.nfsd_open_local_fh = nfsd_open_local_fh,
124124
.nfsd_file_put_local = nfsd_file_put_local,
125-
.nfsd_file_get_local = nfsd_file_get_local,
126125
.nfsd_file_file = nfsd_file_file,
127126
};
128127

include/linux/nfslocalio.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ struct nfsd_localio_operations {
6363
struct nfsd_file __rcu **pnf,
6464
const fmode_t);
6565
struct net *(*nfsd_file_put_local)(struct nfsd_file __rcu **);
66-
struct nfsd_file *(*nfsd_file_get_local)(struct nfsd_file *);
6766
struct file *(*nfsd_file_file)(struct nfsd_file *);
6867
} ____cacheline_aligned;
6968

0 commit comments

Comments
 (0)