Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

nfsd: remove nfsd_close

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>

authored by

Christoph Hellwig and committed by
J. Bruce Fields
fd891454 4bd9e9b7

+6 -16
+1 -1
fs/nfsd/nfs4state.c
··· 5505 5505 __be32 err = nfsd_open(rqstp, fhp, S_IFREG, NFSD_MAY_READ, &file); 5506 5506 if (!err) { 5507 5507 err = nfserrno(vfs_test_lock(file, lock)); 5508 - nfsd_close(file); 5508 + fput(file); 5509 5509 } 5510 5510 return err; 5511 5511 }
+5 -14
fs/nfsd/vfs.c
··· 744 744 745 745 host_err = ima_file_check(file, may_flags, 0); 746 746 if (host_err) { 747 - nfsd_close(file); 747 + fput(file); 748 748 goto out_nfserr; 749 749 } 750 750 ··· 759 759 out: 760 760 validate_process_creds(); 761 761 return err; 762 - } 763 - 764 - /* 765 - * Close a file. 766 - */ 767 - void 768 - nfsd_close(struct file *filp) 769 - { 770 - fput(filp); 771 762 } 772 763 773 764 /* ··· 1031 1040 ra->p_count--; 1032 1041 spin_unlock(&rab->pb_lock); 1033 1042 } 1034 - nfsd_close(file); 1043 + fput(file); 1035 1044 } 1036 1045 1037 1046 /* ··· 1084 1093 if (cnt) 1085 1094 err = nfsd_vfs_write(rqstp, fhp, file, offset, vec, vlen, 1086 1095 cnt, stablep); 1087 - nfsd_close(file); 1096 + fput(file); 1088 1097 } 1089 1098 out: 1090 1099 return err; ··· 1129 1138 err = nfserr_notsupp; 1130 1139 } 1131 1140 1132 - nfsd_close(file); 1141 + fput(file); 1133 1142 out: 1134 1143 return err; 1135 1144 } ··· 1968 1977 if (err == nfserr_eof || err == nfserr_toosmall) 1969 1978 err = nfs_ok; /* can still be found in ->err */ 1970 1979 out_close: 1971 - nfsd_close(file); 1980 + fput(file); 1972 1981 out: 1973 1982 return err; 1974 1983 }
-1
fs/nfsd/vfs.h
··· 71 71 #endif /* CONFIG_NFSD_V3 */ 72 72 __be32 nfsd_open(struct svc_rqst *, struct svc_fh *, umode_t, 73 73 int, struct file **); 74 - void nfsd_close(struct file *); 75 74 struct raparms; 76 75 __be32 nfsd_get_tmp_read_open(struct svc_rqst *, struct svc_fh *, 77 76 struct file **, struct raparms **);