]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
nfsd: remove nfsd_close
authorChristoph Hellwig <hch@lst.de>
Tue, 28 Apr 2015 13:41:16 +0000 (15:41 +0200)
committerJ. Bruce Fields <bfields@redhat.com>
Mon, 4 May 2015 16:02:43 +0000 (12:02 -0400)
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4state.c
fs/nfsd/vfs.c
fs/nfsd/vfs.h

index 039f9c8a95e84289c7296e9b78973efbea9d6e5a..86f5c273c9ec4a9ba2f64358b702ec17f48c3147 100644 (file)
@@ -5505,7 +5505,7 @@ static __be32 nfsd_test_lock(struct svc_rqst *rqstp, struct svc_fh *fhp, struct
        __be32 err = nfsd_open(rqstp, fhp, S_IFREG, NFSD_MAY_READ, &file);
        if (!err) {
                err = nfserrno(vfs_test_lock(file, lock));
-               nfsd_close(file);
+               fput(file);
        }
        return err;
 }
index 84d770be056ee7b1a4db58e3ca0acb648b91a18d..a30e79900086f0eb3955f917a86f0cb891329632 100644 (file)
@@ -744,7 +744,7 @@ nfsd_open(struct svc_rqst *rqstp, struct svc_fh *fhp, umode_t type,
 
        host_err = ima_file_check(file, may_flags, 0);
        if (host_err) {
-               nfsd_close(file);
+               fput(file);
                goto out_nfserr;
        }
 
@@ -761,15 +761,6 @@ out:
        return err;
 }
 
-/*
- * Close a file.
- */
-void
-nfsd_close(struct file *filp)
-{
-       fput(filp);
-}
-
 /*
  * Obtain the readahead parameters for the file
  * specified by (dev, ino).
@@ -1040,7 +1031,7 @@ void nfsd_put_tmp_read_open(struct file *file, struct raparms *ra)
                ra->p_count--;
                spin_unlock(&rab->pb_lock);
        }
-       nfsd_close(file);
+       fput(file);
 }
 
 /*
@@ -1093,7 +1084,7 @@ nfsd_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file,
                if (cnt)
                        err = nfsd_vfs_write(rqstp, fhp, file, offset, vec, vlen,
                                             cnt, stablep);
-               nfsd_close(file);
+               fput(file);
        }
 out:
        return err;
@@ -1138,7 +1129,7 @@ nfsd_commit(struct svc_rqst *rqstp, struct svc_fh *fhp,
                        err = nfserr_notsupp;
        }
 
-       nfsd_close(file);
+       fput(file);
 out:
        return err;
 }
@@ -1977,7 +1968,7 @@ nfsd_readdir(struct svc_rqst *rqstp, struct svc_fh *fhp, loff_t *offsetp,
        if (err == nfserr_eof || err == nfserr_toosmall)
                err = nfs_ok; /* can still be found in ->err */
 out_close:
-       nfsd_close(file);
+       fput(file);
 out:
        return err;
 }
index 2050cb016998fd55dacc854bbc95f484c5f4c341..17a5e0db6a77a6172797d7dd026ca51dd37f97aa 100644 (file)
@@ -71,7 +71,6 @@ __be32                nfsd_commit(struct svc_rqst *, struct svc_fh *,
 #endif /* CONFIG_NFSD_V3 */
 __be32         nfsd_open(struct svc_rqst *, struct svc_fh *, umode_t,
                                int, struct file **);
-void           nfsd_close(struct file *);
 struct raparms;
 __be32         nfsd_get_tmp_read_open(struct svc_rqst *, struct svc_fh *,
                                struct file **, struct raparms **);