]> www.infradead.org Git - users/hch/misc.git/commitdiff
nfsd: discard nfsd_file_get_local()
authorNeilBrown <neil@brown.name>
Fri, 18 Jul 2025 01:26:15 +0000 (11:26 +1000)
committerChuck Lever <chuck.lever@oracle.com>
Sun, 21 Sep 2025 23:24:50 +0000 (19:24 -0400)
This interface was deprecated by commit e6f7e1487ab5 ("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>
fs/nfsd/filecache.c
fs/nfsd/filecache.h
fs/nfsd/localio.c
include/linux/nfslocalio.h

index 732abf6b92a569336865985e61906e9263efeec7..75bc48031c0770cda4b68b4f1b5c5be1c51acd3e 100644 (file)
@@ -391,27 +391,6 @@ nfsd_file_put_local(struct nfsd_file __rcu **pnf)
        return net;
 }
 
-/**
- * nfsd_file_get_local - get nfsd_file reference and reference to net
- * @nf: nfsd_file of which to put the reference
- *
- * Get reference to both the nfsd_file and nf->nf_net.
- */
-struct nfsd_file *
-nfsd_file_get_local(struct nfsd_file *nf)
-{
-       struct net *net = nf->nf_net;
-
-       if (nfsd_net_try_get(net)) {
-               nf = nfsd_file_get(nf);
-               if (!nf)
-                       nfsd_net_put(net);
-       } else {
-               nf = NULL;
-       }
-       return nf;
-}
-
 /**
  * nfsd_file_file - get the backing file of an nfsd_file
  * @nf: nfsd_file of which to access the backing file.
index 722b26c71e454a41ddf32baef6c5747fca0ec5a9..24ddf60e8434a23122cc08e23a609c4bd8f0f6c0 100644 (file)
@@ -63,7 +63,6 @@ int nfsd_file_cache_start_net(struct net *net);
 void nfsd_file_cache_shutdown_net(struct net *net);
 void nfsd_file_put(struct nfsd_file *nf);
 struct net *nfsd_file_put_local(struct nfsd_file __rcu **nf);
-struct nfsd_file *nfsd_file_get_local(struct nfsd_file *nf);
 struct nfsd_file *nfsd_file_get(struct nfsd_file *nf);
 struct file *nfsd_file_file(struct nfsd_file *nf);
 void nfsd_file_close_inode_sync(struct inode *inode);
index cb237f1b902a76b479a8beadc3b51fa8f5a265b4..269fa9391dc4668ae8a737f492c0761c4d7b0eaa 100644 (file)
@@ -122,7 +122,6 @@ static const struct nfsd_localio_operations nfsd_localio_ops = {
        .nfsd_net_put  = nfsd_net_put,
        .nfsd_open_local_fh = nfsd_open_local_fh,
        .nfsd_file_put_local = nfsd_file_put_local,
-       .nfsd_file_get_local = nfsd_file_get_local,
        .nfsd_file_file = nfsd_file_file,
 };
 
index 5c7c92659e736fa916ed227f99d5ec35315fce83..59ea90bd136b69c1cb7ddcbb0f5d9290684193c5 100644 (file)
@@ -63,7 +63,6 @@ struct nfsd_localio_operations {
                                                struct nfsd_file __rcu **pnf,
                                                const fmode_t);
        struct net *(*nfsd_file_put_local)(struct nfsd_file __rcu **);
-       struct nfsd_file *(*nfsd_file_get_local)(struct nfsd_file *);
        struct file *(*nfsd_file_file)(struct nfsd_file *);
 } ____cacheline_aligned;