NFSD: drop fname and flen args from nfsd_create_locked()
authorNeilBrown <neilb@suse.de>
Tue, 6 Sep 2022 00:42:19 +0000 (10:42 +1000)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 26 Sep 2022 18:02:30 +0000 (14:02 -0400)
nfsd_create_locked() does not use the "fname" and "flen" arguments, so
drop them from declaration and all callers.

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

index 4b19cc727ea50b1a2a3f796cbf831992e8a7357e..ee02ede74bf53d6a5d853339d2eef47a84f1335c 100644 (file)
@@ -391,9 +391,8 @@ nfsd_proc_create(struct svc_rqst *rqstp)
        resp->status = nfs_ok;
        if (!inode) {
                /* File doesn't exist. Create it and set attrs */
-               resp->status = nfsd_create_locked(rqstp, dirfhp, argp->name,
-                                                 argp->len, &attrs, type, rdev,
-                                                 newfhp);
+               resp->status = nfsd_create_locked(rqstp, dirfhp, &attrs, type,
+                                                 rdev, newfhp);
        } else if (type == S_IFREG) {
                dprintk("nfsd:   existing %s, valid=%x, size=%ld\n",
                        argp->name, attr->ia_valid, (long) attr->ia_size);
index fc17b0ac8729792ba277d5117ea77da40372d47c..712fbfe30f53961ebfd6ece77ee26da948e75a60 100644 (file)
@@ -1255,7 +1255,7 @@ nfsd_check_ignore_resizing(struct iattr *iap)
 /* The parent directory should already be locked: */
 __be32
 nfsd_create_locked(struct svc_rqst *rqstp, struct svc_fh *fhp,
-                  char *fname, int flen, struct nfsd_attrs *attrs,
+                  struct nfsd_attrs *attrs,
                   int type, dev_t rdev, struct svc_fh *resfhp)
 {
        struct dentry   *dentry, *dchild;
@@ -1382,8 +1382,7 @@ nfsd_create(struct svc_rqst *rqstp, struct svc_fh *fhp,
        if (err)
                goto out_unlock;
        fh_fill_pre_attrs(fhp);
-       err = nfsd_create_locked(rqstp, fhp, fname, flen, attrs, type,
-                                rdev, resfhp);
+       err = nfsd_create_locked(rqstp, fhp, attrs, type, rdev, resfhp);
        fh_fill_post_attrs(fhp);
 out_unlock:
        inode_unlock(dentry->d_inode);
index c95cd414b4bb01d0db40235fbf1eb36c7e14813f..120521bc7b24766842dfa6f143c2129037fc07f2 100644 (file)
@@ -79,8 +79,8 @@ __be32                nfsd4_clone_file_range(struct svc_rqst *rqstp,
                                       u64 count, bool sync);
 #endif /* CONFIG_NFSD_V4 */
 __be32         nfsd_create_locked(struct svc_rqst *, struct svc_fh *,
-                               char *name, int len, struct nfsd_attrs *attrs,
-                               int type, dev_t rdev, struct svc_fh *res);
+                               struct nfsd_attrs *attrs, int type, dev_t rdev,
+                               struct svc_fh *res);
 __be32         nfsd_create(struct svc_rqst *, struct svc_fh *,
                                char *name, int len, struct nfsd_attrs *attrs,
                                int type, dev_t rdev, struct svc_fh *res);