Lines Matching refs:rqstp
59 nfsd_cross_mnt(struct svc_rqst *rqstp, struct dentry **dpp, in nfsd_cross_mnt() argument
78 exp2 = rqst_exp_get_by_name(rqstp, &path); in nfsd_cross_mnt()
93 if (nfsd_v4client(rqstp) || in nfsd_cross_mnt()
124 static int nfsd_lookup_parent(struct svc_rqst *rqstp, struct dentry *dparent, struct svc_export **e… in nfsd_lookup_parent() argument
132 exp2 = rqst_exp_parent(rqstp, &path); in nfsd_lookup_parent()
173 nfsd_lookup_dentry(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd_lookup_dentry() argument
193 else if (!EX_NOHIDE(exp) && !nfsd_v4client(rqstp)) in nfsd_lookup_dentry()
197 host_err = nfsd_lookup_parent(rqstp, dparent, &exp, &dentry); in nfsd_lookup_dentry()
222 if ((host_err = nfsd_cross_mnt(rqstp, &dentry, &exp))) { in nfsd_lookup_dentry()
250 nfsd_lookup(struct svc_rqst *rqstp, struct svc_fh *fhp, const char *name, in nfsd_lookup() argument
257 err = fh_verify(rqstp, fhp, S_IFDIR, NFSD_MAY_EXEC); in nfsd_lookup()
260 err = nfsd_lookup_dentry(rqstp, fhp, name, len, &exp, &dentry); in nfsd_lookup()
263 err = check_nfsd_access(exp, rqstp); in nfsd_lookup()
332 nfsd_get_write_access(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd_get_write_access() argument
341 err = nfsd_permission(rqstp, fhp->fh_export, fhp->fh_dentry, in nfsd_get_write_access()
366 nfsd_setattr(struct svc_rqst *rqstp, struct svc_fh *fhp, struct iattr *iap, in nfsd_setattr() argument
400 err = fh_verify(rqstp, fhp, ftype, accmode); in nfsd_setattr()
432 err = nfsd_get_write_access(rqstp, fhp, iap); in nfsd_setattr()
507 __be32 nfsd4_set_nfs4_label(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd4_set_nfs4_label() argument
514 error = fh_verify(rqstp, fhp, 0 /* S_IFREG */, NFSD_MAY_SATTR); in nfsd4_set_nfs4_label()
526 __be32 nfsd4_set_nfs4_label(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd4_set_nfs4_label() argument
592 __be32 nfsd4_vfs_fallocate(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd4_vfs_fallocate() argument
665 nfsd_access(struct svc_rqst *rqstp, struct svc_fh *fhp, u32 *access, u32 *supported) in nfsd_access() argument
673 error = fh_verify(rqstp, fhp, 0, NFSD_MAY_NOP); in nfsd_access()
695 err2 = nfsd_permission(rqstp, export, dentry, map->how); in nfsd_access()
740 __nfsd_open(struct svc_rqst *rqstp, struct svc_fh *fhp, umode_t type, in __nfsd_open() argument
807 nfsd_open(struct svc_rqst *rqstp, struct svc_fh *fhp, umode_t type, in nfsd_open() argument
826 err = fh_verify(rqstp, fhp, type, may_flags); in nfsd_open()
828 err = __nfsd_open(rqstp, fhp, type, may_flags, filp); in nfsd_open()
834 nfsd_open_verified(struct svc_rqst *rqstp, struct svc_fh *fhp, umode_t type, in nfsd_open_verified() argument
840 err = __nfsd_open(rqstp, fhp, type, may_flags, filp); in nfsd_open_verified()
854 struct svc_rqst *rqstp = sd->u.data; in nfsd_splice_actor() local
855 struct page **pp = rqstp->rq_next_page; in nfsd_splice_actor()
861 if (rqstp->rq_res.page_len == 0) { in nfsd_splice_actor()
863 put_page(*rqstp->rq_next_page); in nfsd_splice_actor()
864 *(rqstp->rq_next_page++) = page; in nfsd_splice_actor()
865 rqstp->rq_res.page_base = buf->offset; in nfsd_splice_actor()
866 rqstp->rq_res.page_len = size; in nfsd_splice_actor()
869 if (*rqstp->rq_next_page) in nfsd_splice_actor()
870 put_page(*rqstp->rq_next_page); in nfsd_splice_actor()
871 *(rqstp->rq_next_page++) = page; in nfsd_splice_actor()
872 rqstp->rq_res.page_len += size; in nfsd_splice_actor()
874 rqstp->rq_res.page_len += size; in nfsd_splice_actor()
895 static __be32 nfsd_finish_read(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd_finish_read() argument
904 trace_nfsd_read_io_done(rqstp, fhp, offset, *count); in nfsd_finish_read()
907 trace_nfsd_read_err(rqstp, fhp, offset, host_err); in nfsd_finish_read()
912 __be32 nfsd_splice_read(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd_splice_read() argument
920 .u.data = rqstp, in nfsd_splice_read()
924 trace_nfsd_read_splice(rqstp, fhp, offset, *count); in nfsd_splice_read()
925 rqstp->rq_next_page = rqstp->rq_respages + 1; in nfsd_splice_read()
927 return nfsd_finish_read(rqstp, fhp, file, offset, count, eof, host_err); in nfsd_splice_read()
930 __be32 nfsd_readv(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd_readv() argument
939 trace_nfsd_read_vector(rqstp, fhp, offset, *count); in nfsd_readv()
942 return nfsd_finish_read(rqstp, fhp, file, offset, count, eof, host_err); in nfsd_readv()
983 nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct nfsd_file *nf, in nfsd_vfs_write() argument
999 trace_nfsd_write_opened(rqstp, fhp, offset, *cnt); in nfsd_vfs_write()
1001 if (test_bit(RQ_LOCAL, &rqstp->rq_flags)) in nfsd_vfs_write()
1012 use_wgather = (rqstp->rq_vers == 2) && EX_WGATHER(exp); in nfsd_vfs_write()
1025 net_generic(SVC_NET(rqstp), in nfsd_vfs_write()
1029 nfsd_reset_boot_verifier(net_generic(SVC_NET(rqstp), in nfsd_vfs_write()
1034 net_generic(SVC_NET(rqstp), in nfsd_vfs_write()
1039 nfsd_reset_boot_verifier(net_generic(SVC_NET(rqstp), in nfsd_vfs_write()
1053 nfsd_reset_boot_verifier(net_generic(SVC_NET(rqstp), in nfsd_vfs_write()
1059 trace_nfsd_write_io_done(rqstp, fhp, offset, *cnt); in nfsd_vfs_write()
1062 trace_nfsd_write_err(rqstp, fhp, offset, host_err); in nfsd_vfs_write()
1065 if (test_bit(RQ_LOCAL, &rqstp->rq_flags)) in nfsd_vfs_write()
1075 __be32 nfsd_read(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd_read() argument
1083 trace_nfsd_read_start(rqstp, fhp, offset, *count); in nfsd_read()
1084 err = nfsd_file_acquire(rqstp, fhp, NFSD_MAY_READ, &nf); in nfsd_read()
1089 if (file->f_op->splice_read && test_bit(RQ_SPLICE_OK, &rqstp->rq_flags)) in nfsd_read()
1090 err = nfsd_splice_read(rqstp, fhp, file, offset, count, eof); in nfsd_read()
1092 err = nfsd_readv(rqstp, fhp, file, offset, vec, vlen, count, eof); in nfsd_read()
1096 trace_nfsd_read_done(rqstp, fhp, offset, *count); in nfsd_read()
1107 nfsd_write(struct svc_rqst *rqstp, struct svc_fh *fhp, loff_t offset, in nfsd_write() argument
1114 trace_nfsd_write_start(rqstp, fhp, offset, *cnt); in nfsd_write()
1116 err = nfsd_file_acquire(rqstp, fhp, NFSD_MAY_WRITE, &nf); in nfsd_write()
1120 err = nfsd_vfs_write(rqstp, fhp, nf, offset, vec, in nfsd_write()
1124 trace_nfsd_write_done(rqstp, fhp, offset, *cnt); in nfsd_write()
1139 nfsd_commit(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd_commit() argument
1154 err = nfsd_file_acquire(rqstp, fhp, in nfsd_commit()
1190 nfsd_create_setattr(struct svc_rqst *rqstp, struct svc_fh *resfhp, in nfsd_create_setattr() argument
1205 return nfsd_setattr(rqstp, resfhp, iap, 0, (time64_t)0); in nfsd_create_setattr()
1227 nfsd_create_locked(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd_create_locked() argument
1248 err = nfsd_permission(rqstp, fhp->fh_export, dentry, NFSD_MAY_CREATE); in nfsd_create_locked()
1306 err = nfsd_create_setattr(rqstp, resfhp, iap); in nfsd_create_locked()
1338 nfsd_create(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd_create() argument
1349 err = fh_verify(rqstp, fhp, S_IFDIR, NFSD_MAY_NOP); in nfsd_create()
1372 return nfsd_create_locked(rqstp, fhp, fname, flen, iap, type, in nfsd_create()
1382 do_nfsd_create(struct svc_rqst *rqstp, struct svc_fh *fhp, in do_nfsd_create() argument
1401 err = fh_verify(rqstp, fhp, S_IFDIR, NFSD_MAY_EXEC); in do_nfsd_create()
1424 err = fh_verify(rqstp, fhp, S_IFDIR, NFSD_MAY_CREATE); in do_nfsd_create()
1516 err = nfsd_create_setattr(rqstp, resfhp, iap); in do_nfsd_create()
1550 nfsd_readlink(struct svc_rqst *rqstp, struct svc_fh *fhp, char *buf, int *lenp) in nfsd_readlink() argument
1558 err = fh_verify(rqstp, fhp, S_IFLNK, NFSD_MAY_NOP); in nfsd_readlink()
1587 nfsd_symlink(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd_symlink() argument
1603 err = fh_verify(rqstp, fhp, S_IFDIR, NFSD_MAY_CREATE); in nfsd_symlink()
1642 nfsd_link(struct svc_rqst *rqstp, struct svc_fh *ffhp, in nfsd_link() argument
1650 err = fh_verify(rqstp, ffhp, S_IFDIR, NFSD_MAY_CREATE); in nfsd_link()
1653 err = fh_verify(rqstp, tfhp, 0, NFSD_MAY_NOP); in nfsd_link()
1692 if (host_err == -EXDEV && rqstp->rq_vers == 2) in nfsd_link()
1735 nfsd_rename(struct svc_rqst *rqstp, struct svc_fh *ffhp, char *fname, int flen, in nfsd_rename() argument
1744 err = fh_verify(rqstp, ffhp, S_IFDIR, NFSD_MAY_REMOVE); in nfsd_rename()
1747 err = fh_verify(rqstp, tfhp, S_IFDIR, NFSD_MAY_CREATE); in nfsd_rename()
1852 nfsd_unlink(struct svc_rqst *rqstp, struct svc_fh *fhp, int type, in nfsd_unlink() argument
1863 err = fh_verify(rqstp, fhp, S_IFDIR, NFSD_MAY_REMOVE); in nfsd_unlink()
1907 if (nfsd_v4client(rqstp)) in nfsd_unlink()
2037 nfsd_readdir(struct svc_rqst *rqstp, struct svc_fh *fhp, loff_t *offsetp, in nfsd_readdir() argument
2046 if (rqstp->rq_vers > 2) in nfsd_readdir()
2049 err = nfsd_open(rqstp, fhp, S_IFDIR, may_flags, &file); in nfsd_readdir()
2074 nfsd_statfs(struct svc_rqst *rqstp, struct svc_fh *fhp, struct kstatfs *stat, int access) in nfsd_statfs() argument
2078 err = fh_verify(rqstp, fhp, 0, NFSD_MAY_NOP | access); in nfsd_statfs()
2090 static int exp_rdonly(struct svc_rqst *rqstp, struct svc_export *exp) in exp_rdonly() argument
2092 return nfsexp_flags(rqstp, exp) & NFSEXP_READONLY; in exp_rdonly()
2137 nfsd_getxattr(struct svc_rqst *rqstp, struct svc_fh *fhp, char *name, in nfsd_getxattr() argument
2146 err = fh_verify(rqstp, fhp, 0, NFSD_MAY_READ); in nfsd_getxattr()
2210 nfsd_listxattr(struct svc_rqst *rqstp, struct svc_fh *fhp, char **bufp, in nfsd_listxattr() argument
2219 err = fh_verify(rqstp, fhp, 0, NFSD_MAY_READ); in nfsd_listxattr()
2275 nfsd_removexattr(struct svc_rqst *rqstp, struct svc_fh *fhp, char *name) in nfsd_removexattr() argument
2280 err = fh_verify(rqstp, fhp, 0, NFSD_MAY_WRITE); in nfsd_removexattr()
2299 nfsd_setxattr(struct svc_rqst *rqstp, struct svc_fh *fhp, char *name, in nfsd_setxattr() argument
2305 err = fh_verify(rqstp, fhp, 0, NFSD_MAY_WRITE); in nfsd_setxattr()
2328 nfsd_permission(struct svc_rqst *rqstp, struct svc_export *exp, in nfsd_permission() argument
2360 if (exp_rdonly(rqstp, exp) || in nfsd_permission()