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
340 err = nfsd_permission(rqstp, fhp->fh_export, fhp->fh_dentry, in nfsd_get_write_access()
352 nfsd_setattr(struct svc_rqst *rqstp, struct svc_fh *fhp, struct iattr *iap, in nfsd_setattr() argument
386 err = fh_verify(rqstp, fhp, ftype, accmode); in nfsd_setattr()
418 err = nfsd_get_write_access(rqstp, fhp, iap); in nfsd_setattr()
494 __be32 nfsd4_set_nfs4_label(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd4_set_nfs4_label() argument
501 error = fh_verify(rqstp, fhp, 0 /* S_IFREG */, NFSD_MAY_SATTR); in nfsd4_set_nfs4_label()
513 __be32 nfsd4_set_nfs4_label(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd4_set_nfs4_label() argument
571 __be32 nfsd4_vfs_fallocate(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd4_vfs_fallocate() argument
644 nfsd_access(struct svc_rqst *rqstp, struct svc_fh *fhp, u32 *access, u32 *supported) in nfsd_access() argument
652 error = fh_verify(rqstp, fhp, 0, NFSD_MAY_NOP); in nfsd_access()
674 err2 = nfsd_permission(rqstp, export, dentry, map->how); in nfsd_access()
719 __nfsd_open(struct svc_rqst *rqstp, struct svc_fh *fhp, umode_t type, in __nfsd_open() argument
776 nfsd_open(struct svc_rqst *rqstp, struct svc_fh *fhp, umode_t type, in nfsd_open() argument
795 err = fh_verify(rqstp, fhp, type, may_flags); in nfsd_open()
797 err = __nfsd_open(rqstp, fhp, type, may_flags, filp); in nfsd_open()
803 nfsd_open_verified(struct svc_rqst *rqstp, struct svc_fh *fhp, umode_t type, in nfsd_open_verified() argument
809 err = __nfsd_open(rqstp, fhp, type, may_flags, filp); in nfsd_open_verified()
823 struct svc_rqst *rqstp = sd->u.data; in nfsd_splice_actor() local
824 struct page **pp = rqstp->rq_next_page; in nfsd_splice_actor()
827 if (rqstp->rq_res.page_len == 0) { in nfsd_splice_actor()
828 svc_rqst_replace_page(rqstp, page); in nfsd_splice_actor()
829 rqstp->rq_res.page_base = buf->offset; in nfsd_splice_actor()
831 svc_rqst_replace_page(rqstp, page); in nfsd_splice_actor()
833 rqstp->rq_res.page_len += sd->len; in nfsd_splice_actor()
854 static __be32 nfsd_finish_read(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd_finish_read() argument
863 trace_nfsd_read_io_done(rqstp, fhp, offset, *count); in nfsd_finish_read()
866 trace_nfsd_read_err(rqstp, fhp, offset, host_err); in nfsd_finish_read()
871 __be32 nfsd_splice_read(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd_splice_read() argument
879 .u.data = rqstp, in nfsd_splice_read()
883 trace_nfsd_read_splice(rqstp, fhp, offset, *count); in nfsd_splice_read()
884 rqstp->rq_next_page = rqstp->rq_respages + 1; in nfsd_splice_read()
886 return nfsd_finish_read(rqstp, fhp, file, offset, count, eof, host_err); in nfsd_splice_read()
889 __be32 nfsd_readv(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd_readv() argument
898 trace_nfsd_read_vector(rqstp, fhp, offset, *count); in nfsd_readv()
901 return nfsd_finish_read(rqstp, fhp, file, offset, count, eof, host_err); in nfsd_readv()
942 nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct nfsd_file *nf, in nfsd_vfs_write() argument
960 trace_nfsd_write_opened(rqstp, fhp, offset, *cnt); in nfsd_vfs_write()
965 if (test_bit(RQ_LOCAL, &rqstp->rq_flags) && in nfsd_vfs_write()
979 use_wgather = (rqstp->rq_vers == 2) && EX_WGATHER(exp); in nfsd_vfs_write()
992 nfsd_reset_boot_verifier(net_generic(SVC_NET(rqstp), in nfsd_vfs_write()
999 net_generic(SVC_NET(rqstp), in nfsd_vfs_write()
1005 nfsd_reset_boot_verifier(net_generic(SVC_NET(rqstp), in nfsd_vfs_write()
1016 nfsd_reset_boot_verifier(net_generic(SVC_NET(rqstp), in nfsd_vfs_write()
1022 trace_nfsd_write_io_done(rqstp, fhp, offset, *cnt); in nfsd_vfs_write()
1025 trace_nfsd_write_err(rqstp, fhp, offset, host_err); in nfsd_vfs_write()
1038 __be32 nfsd_read(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd_read() argument
1046 trace_nfsd_read_start(rqstp, fhp, offset, *count); in nfsd_read()
1047 err = nfsd_file_acquire(rqstp, fhp, NFSD_MAY_READ, &nf); in nfsd_read()
1052 if (file->f_op->splice_read && test_bit(RQ_SPLICE_OK, &rqstp->rq_flags)) in nfsd_read()
1053 err = nfsd_splice_read(rqstp, fhp, file, offset, count, eof); in nfsd_read()
1055 err = nfsd_readv(rqstp, fhp, file, offset, vec, vlen, count, eof); in nfsd_read()
1059 trace_nfsd_read_done(rqstp, fhp, offset, *count); in nfsd_read()
1070 nfsd_write(struct svc_rqst *rqstp, struct svc_fh *fhp, loff_t offset, in nfsd_write() argument
1077 trace_nfsd_write_start(rqstp, fhp, offset, *cnt); in nfsd_write()
1079 err = nfsd_file_acquire(rqstp, fhp, NFSD_MAY_WRITE, &nf); in nfsd_write()
1083 err = nfsd_vfs_write(rqstp, fhp, nf, offset, vec, in nfsd_write()
1087 trace_nfsd_write_done(rqstp, fhp, offset, *cnt); in nfsd_write()
1115 nfsd_commit(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd_commit() argument
1130 err = nfsd_file_acquire(rqstp, fhp, in nfsd_commit()
1165 nfsd_create_setattr(struct svc_rqst *rqstp, struct svc_fh *resfhp, in nfsd_create_setattr() argument
1180 return nfsd_setattr(rqstp, resfhp, iap, 0, (time64_t)0); in nfsd_create_setattr()
1202 nfsd_create_locked(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd_create_locked() argument
1223 err = nfsd_permission(rqstp, fhp->fh_export, dentry, NFSD_MAY_CREATE); in nfsd_create_locked()
1282 err = nfsd_create_setattr(rqstp, resfhp, iap); in nfsd_create_locked()
1314 nfsd_create(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd_create() argument
1325 err = fh_verify(rqstp, fhp, S_IFDIR, NFSD_MAY_NOP); in nfsd_create()
1348 return nfsd_create_locked(rqstp, fhp, fname, flen, iap, type, in nfsd_create()
1358 do_nfsd_create(struct svc_rqst *rqstp, struct svc_fh *fhp, in do_nfsd_create() argument
1377 err = fh_verify(rqstp, fhp, S_IFDIR, NFSD_MAY_EXEC); in do_nfsd_create()
1400 err = fh_verify(rqstp, fhp, S_IFDIR, NFSD_MAY_CREATE); in do_nfsd_create()
1493 err = nfsd_create_setattr(rqstp, resfhp, iap); in do_nfsd_create()
1527 nfsd_readlink(struct svc_rqst *rqstp, struct svc_fh *fhp, char *buf, int *lenp) in nfsd_readlink() argument
1535 err = fh_verify(rqstp, fhp, S_IFLNK, NFSD_MAY_NOP); in nfsd_readlink()
1564 nfsd_symlink(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd_symlink() argument
1580 err = fh_verify(rqstp, fhp, S_IFDIR, NFSD_MAY_CREATE); in nfsd_symlink()
1619 nfsd_link(struct svc_rqst *rqstp, struct svc_fh *ffhp, in nfsd_link() argument
1627 err = fh_verify(rqstp, ffhp, S_IFDIR, NFSD_MAY_CREATE); in nfsd_link()
1630 err = fh_verify(rqstp, tfhp, 0, NFSD_MAY_NOP); in nfsd_link()
1670 if (host_err == -EXDEV && rqstp->rq_vers == 2) in nfsd_link()
1713 nfsd_rename(struct svc_rqst *rqstp, struct svc_fh *ffhp, char *fname, int flen, in nfsd_rename() argument
1722 err = fh_verify(rqstp, ffhp, S_IFDIR, NFSD_MAY_REMOVE); in nfsd_rename()
1725 err = fh_verify(rqstp, tfhp, S_IFDIR, NFSD_MAY_CREATE); in nfsd_rename()
1839 nfsd_unlink(struct svc_rqst *rqstp, struct svc_fh *fhp, int type, in nfsd_unlink() argument
1851 err = fh_verify(rqstp, fhp, S_IFDIR, NFSD_MAY_REMOVE); in nfsd_unlink()
1900 if (nfsd_v4client(rqstp)) in nfsd_unlink()
2033 nfsd_readdir(struct svc_rqst *rqstp, struct svc_fh *fhp, loff_t *offsetp, in nfsd_readdir() argument
2042 if (rqstp->rq_vers > 2) in nfsd_readdir()
2045 err = nfsd_open(rqstp, fhp, S_IFDIR, may_flags, &file); in nfsd_readdir()
2070 nfsd_statfs(struct svc_rqst *rqstp, struct svc_fh *fhp, struct kstatfs *stat, int access) in nfsd_statfs() argument
2074 err = fh_verify(rqstp, fhp, 0, NFSD_MAY_NOP | access); in nfsd_statfs()
2086 static int exp_rdonly(struct svc_rqst *rqstp, struct svc_export *exp) in exp_rdonly() argument
2088 return nfsexp_flags(rqstp, exp) & NFSEXP_READONLY; in exp_rdonly()
2133 nfsd_getxattr(struct svc_rqst *rqstp, struct svc_fh *fhp, char *name, in nfsd_getxattr() argument
2142 err = fh_verify(rqstp, fhp, 0, NFSD_MAY_READ); in nfsd_getxattr()
2206 nfsd_listxattr(struct svc_rqst *rqstp, struct svc_fh *fhp, char **bufp, in nfsd_listxattr() argument
2215 err = fh_verify(rqstp, fhp, 0, NFSD_MAY_READ); in nfsd_listxattr()
2271 nfsd_removexattr(struct svc_rqst *rqstp, struct svc_fh *fhp, char *name) in nfsd_removexattr() argument
2276 err = fh_verify(rqstp, fhp, 0, NFSD_MAY_WRITE); in nfsd_removexattr()
2296 nfsd_setxattr(struct svc_rqst *rqstp, struct svc_fh *fhp, char *name, in nfsd_setxattr() argument
2302 err = fh_verify(rqstp, fhp, 0, NFSD_MAY_WRITE); in nfsd_setxattr()
2325 nfsd_permission(struct svc_rqst *rqstp, struct svc_export *exp, in nfsd_permission() argument
2357 if (exp_rdonly(rqstp, exp) || in nfsd_permission()