]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
nfsd: add nfsd_file_{get,put} to 'nfs_to' nfsd_localio_operations
authorMike Snitzer <snitzer@kernel.org>
Sat, 16 Nov 2024 01:40:54 +0000 (20:40 -0500)
committerAnna Schumaker <anna.schumaker@oracle.com>
Tue, 14 Jan 2025 22:04:05 +0000 (17:04 -0500)
In later a commit LOCALIO must call both nfsd_file_get and
nfsd_file_put to manage extra nfsd_file references.

Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Acked-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
fs/nfsd/localio.c
include/linux/nfslocalio.h

index f441cb9f74d56cb91534ef81f4130aa176771992..8beda4c8511198f35de0828bb50a456280c222f3 100644 (file)
@@ -29,6 +29,8 @@ static const struct nfsd_localio_operations nfsd_localio_ops = {
        .nfsd_serv_put  = nfsd_serv_put,
        .nfsd_open_local_fh = nfsd_open_local_fh,
        .nfsd_file_put_local = nfsd_file_put_local,
+       .nfsd_file_get = nfsd_file_get,
+       .nfsd_file_put = nfsd_file_put,
        .nfsd_file_file = nfsd_file_file,
 };
 
index 9202f4b24343d7e9ea05ef7e851aa04d3b7df06b..ab6a2a53f505f5dd33fe4aebd8d5630269c46ac1 100644 (file)
@@ -56,6 +56,8 @@ struct nfsd_localio_operations {
                                                const struct nfs_fh *,
                                                const fmode_t);
        struct net *(*nfsd_file_put_local)(struct nfsd_file *);
+       struct nfsd_file *(*nfsd_file_get)(struct nfsd_file *);
+       void (*nfsd_file_put)(struct nfsd_file *);
        struct file *(*nfsd_file_file)(struct nfsd_file *);
 } ____cacheline_aligned;