]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
NFSD: Remove unused function parameter
authorChuck Lever <chuck.lever@oracle.com>
Sun, 29 Sep 2024 16:29:43 +0000 (12:29 -0400)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 11 Nov 2024 18:41:58 +0000 (13:41 -0500)
Clean up: Commit 65294c1f2c5e ("nfsd: add a new struct file caching
facility to nfsd") moved the fh_verify() call site out of
nfsd_open(). That was the only user of nfsd_open's @rqstp parameter,
so that parameter can be removed.

Reviewed-by: NeilBrown <neilb@suse.de>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/nfsd/filecache.c
fs/nfsd/vfs.c
fs/nfsd/vfs.h

index 2e6783f63712454509c526969a622040985da577..1408166222c5f963715eae8cfbf88f1c14bc1d2d 100644 (file)
@@ -1123,8 +1123,7 @@ open_file:
                        status = nfs_ok;
                        trace_nfsd_file_opened(nf, status);
                } else {
-                       ret = nfsd_open_verified(rqstp, fhp, may_flags,
-                                                &nf->nf_file);
+                       ret = nfsd_open_verified(fhp, may_flags, &nf->nf_file);
                        if (ret == -EOPENSTALE && stale_retry) {
                                stale_retry = false;
                                nfsd_file_unhash(nf);
index d6d4f2a0e898267816538bdb9416fbdf1dc8c5ed..e0692401da33e641d4f32c67bdc2aaab72a2010b 100644 (file)
@@ -861,8 +861,7 @@ int nfsd_open_break_lease(struct inode *inode, int access)
  * N.B. After this call fhp needs an fh_put
  */
 static int
-__nfsd_open(struct svc_rqst *rqstp, struct svc_fh *fhp, umode_t type,
-                       int may_flags, struct file **filp)
+__nfsd_open(struct svc_fh *fhp, umode_t type, int may_flags, struct file **filp)
 {
        struct path     path;
        struct inode    *inode;
@@ -932,7 +931,7 @@ nfsd_open(struct svc_rqst *rqstp, struct svc_fh *fhp, umode_t type,
 retry:
        err = fh_verify(rqstp, fhp, type, may_flags);
        if (!err) {
-               host_err = __nfsd_open(rqstp, fhp, type, may_flags, filp);
+               host_err = __nfsd_open(fhp, type, may_flags, filp);
                if (host_err == -EOPENSTALE && !retried) {
                        retried = true;
                        fh_put(fhp);
@@ -945,7 +944,6 @@ retry:
 
 /**
  * nfsd_open_verified - Open a regular file for the filecache
- * @rqstp: RPC request
  * @fhp: NFS filehandle of the file to open
  * @may_flags: internal permission flags
  * @filp: OUT: open "struct file *"
@@ -953,10 +951,9 @@ retry:
  * Returns zero on success, or a negative errno value.
  */
 int
-nfsd_open_verified(struct svc_rqst *rqstp, struct svc_fh *fhp, int may_flags,
-                  struct file **filp)
+nfsd_open_verified(struct svc_fh *fhp, int may_flags, struct file **filp)
 {
-       return __nfsd_open(rqstp, fhp, S_IFREG, may_flags, filp);
+       return __nfsd_open(fhp, S_IFREG, may_flags, filp);
 }
 
 /*
index 3ff1465225569628cf5c18f1fc9ad4a4ca180a08..854fb95dfdca4bd68fb735b5cea1eef94f7e2564 100644 (file)
@@ -114,8 +114,8 @@ __be32              nfsd_setxattr(struct svc_rqst *rqstp, struct svc_fh *fhp,
 int            nfsd_open_break_lease(struct inode *, int);
 __be32         nfsd_open(struct svc_rqst *, struct svc_fh *, umode_t,
                                int, struct file **);
-int            nfsd_open_verified(struct svc_rqst *rqstp, struct svc_fh *fhp,
-                                  int may_flags, struct file **filp);
+int            nfsd_open_verified(struct svc_fh *fhp, int may_flags,
+                               struct file **filp);
 __be32         nfsd_splice_read(struct svc_rqst *rqstp, struct svc_fh *fhp,
                                struct file *file, loff_t offset,
                                unsigned long *count,