Lines Matching refs:rqstp
83 nfsd_cross_mnt(struct svc_rqst *rqstp, struct dentry **dpp, in nfsd_cross_mnt() argument
96 exp2 = rqst_exp_get_by_name(rqstp, &path); in nfsd_cross_mnt()
111 if (nfsd_v4client(rqstp) || in nfsd_cross_mnt()
142 static int nfsd_lookup_parent(struct svc_rqst *rqstp, struct dentry *dparent, struct svc_export **e… in nfsd_lookup_parent() argument
150 exp2 = rqst_exp_parent(rqstp, &path); in nfsd_lookup_parent()
181 nfsd_lookup_dentry(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd_lookup_dentry() argument
201 else if (!EX_NOHIDE(exp) && !nfsd_v4client(rqstp)) in nfsd_lookup_dentry()
205 host_err = nfsd_lookup_parent(rqstp, dparent, &exp, &dentry); in nfsd_lookup_dentry()
224 if ((host_err = nfsd_cross_mnt(rqstp, &dentry, &exp))) { in nfsd_lookup_dentry()
252 nfsd_lookup(struct svc_rqst *rqstp, struct svc_fh *fhp, const char *name, in nfsd_lookup() argument
259 err = fh_verify(rqstp, fhp, S_IFDIR, NFSD_MAY_EXEC); in nfsd_lookup()
262 err = nfsd_lookup_dentry(rqstp, fhp, name, len, &exp, &dentry); in nfsd_lookup()
265 err = check_nfsd_access(exp, rqstp); in nfsd_lookup()
364 nfsd_get_write_access(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd_get_write_access() argument
373 err = nfsd_permission(rqstp, fhp->fh_export, fhp->fh_dentry, in nfsd_get_write_access()
398 nfsd_setattr(struct svc_rqst *rqstp, struct svc_fh *fhp, struct iattr *iap, in nfsd_setattr() argument
419 err = fh_verify(rqstp, fhp, ftype, accmode); in nfsd_setattr()
445 err = nfsd_get_write_access(rqstp, fhp, iap); in nfsd_setattr()
511 __be32 nfsd4_set_nfs4_label(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd4_set_nfs4_label() argument
518 error = fh_verify(rqstp, fhp, 0 /* S_IFREG */, NFSD_MAY_SATTR); in nfsd4_set_nfs4_label()
530 __be32 nfsd4_set_nfs4_label(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd4_set_nfs4_label() argument
537 __be32 nfsd4_vfs_fallocate(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd4_vfs_fallocate() argument
547 err = nfsd_permission(rqstp, fhp->fh_export, fhp->fh_dentry, NFSD_MAY_WRITE); in nfsd4_vfs_fallocate()
603 nfsd_access(struct svc_rqst *rqstp, struct svc_fh *fhp, u32 *access, u32 *supported) in nfsd_access() argument
611 error = fh_verify(rqstp, fhp, 0, NFSD_MAY_NOP); in nfsd_access()
633 err2 = nfsd_permission(rqstp, export, dentry, map->how); in nfsd_access()
678 nfsd_open(struct svc_rqst *rqstp, struct svc_fh *fhp, umode_t type, in nfsd_open() argument
703 err = fh_verify(rqstp, fhp, type, may_flags); in nfsd_open()
829 struct svc_rqst *rqstp = sd->u.data; in nfsd_splice_actor() local
830 struct page **pp = rqstp->rq_next_page; in nfsd_splice_actor()
836 if (rqstp->rq_res.page_len == 0) { in nfsd_splice_actor()
838 put_page(*rqstp->rq_next_page); in nfsd_splice_actor()
839 *(rqstp->rq_next_page++) = page; in nfsd_splice_actor()
840 rqstp->rq_res.page_base = buf->offset; in nfsd_splice_actor()
841 rqstp->rq_res.page_len = size; in nfsd_splice_actor()
844 if (*rqstp->rq_next_page) in nfsd_splice_actor()
845 put_page(*rqstp->rq_next_page); in nfsd_splice_actor()
846 *(rqstp->rq_next_page++) = page; in nfsd_splice_actor()
847 rqstp->rq_res.page_len += size; in nfsd_splice_actor()
849 rqstp->rq_res.page_len += size; in nfsd_splice_actor()
872 __be32 nfsd_splice_read(struct svc_rqst *rqstp, in nfsd_splice_read() argument
879 .u.data = rqstp, in nfsd_splice_read()
883 rqstp->rq_next_page = rqstp->rq_respages + 1; in nfsd_splice_read()
902 nfsd_vfs_read(struct svc_rqst *rqstp, struct file *file, in nfsd_vfs_read() argument
905 if (file->f_op->splice_read && test_bit(RQ_SPLICE_OK, &rqstp->rq_flags)) in nfsd_vfs_read()
906 return nfsd_splice_read(rqstp, file, offset, count); in nfsd_vfs_read()
949 nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file, in nfsd_vfs_write() argument
964 if (test_bit(RQ_LOCAL, &rqstp->rq_flags)) in nfsd_vfs_write()
976 use_wgather = (rqstp->rq_vers == 2) && EX_WGATHER(exp); in nfsd_vfs_write()
1007 if (test_bit(RQ_LOCAL, &rqstp->rq_flags)) in nfsd_vfs_write()
1012 __be32 nfsd_get_tmp_read_open(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd_get_tmp_read_open() argument
1018 err = nfsd_open(rqstp, fhp, S_IFREG, NFSD_MAY_READ, file); in nfsd_get_tmp_read_open()
1051 __be32 nfsd_read(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd_read() argument
1058 err = nfsd_get_tmp_read_open(rqstp, fhp, &file, &ra); in nfsd_read()
1062 err = nfsd_vfs_read(rqstp, file, offset, vec, vlen, count); in nfsd_read()
1075 nfsd_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file, in nfsd_write() argument
1082 err = nfsd_permission(rqstp, fhp->fh_export, fhp->fh_dentry, in nfsd_write()
1086 err = nfsd_vfs_write(rqstp, fhp, file, offset, vec, vlen, cnt, in nfsd_write()
1089 err = nfsd_open(rqstp, fhp, S_IFREG, NFSD_MAY_WRITE, &file); in nfsd_write()
1094 err = nfsd_vfs_write(rqstp, fhp, file, offset, vec, vlen, in nfsd_write()
1113 nfsd_commit(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd_commit() argument
1128 err = nfsd_open(rqstp, fhp, S_IFREG, in nfsd_commit()
1148 nfsd_create_setattr(struct svc_rqst *rqstp, struct svc_fh *resfhp, in nfsd_create_setattr() argument
1163 return nfsd_setattr(rqstp, resfhp, iap, 0, (time_t)0); in nfsd_create_setattr()
1192 nfsd_create(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd_create() argument
1209 err = fh_verify(rqstp, fhp, S_IFDIR, NFSD_MAY_CREATE); in nfsd_create()
1294 err = nfsd_create_setattr(rqstp, resfhp, iap); in nfsd_create()
1332 do_nfsd_create(struct svc_rqst *rqstp, struct svc_fh *fhp, in do_nfsd_create() argument
1351 err = fh_verify(rqstp, fhp, S_IFDIR, NFSD_MAY_EXEC); in do_nfsd_create()
1380 err = fh_verify(rqstp, fhp, S_IFDIR, NFSD_MAY_CREATE); in do_nfsd_create()
1468 err = nfsd_create_setattr(rqstp, resfhp, iap); in do_nfsd_create()
1502 nfsd_readlink(struct svc_rqst *rqstp, struct svc_fh *fhp, char *buf, int *lenp) in nfsd_readlink() argument
1510 err = fh_verify(rqstp, fhp, S_IFLNK, NFSD_MAY_NOP); in nfsd_readlink()
1548 nfsd_symlink(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd_symlink() argument
1564 err = fh_verify(rqstp, fhp, S_IFDIR, NFSD_MAY_CREATE); in nfsd_symlink()
1603 nfsd_link(struct svc_rqst *rqstp, struct svc_fh *ffhp, in nfsd_link() argument
1611 err = fh_verify(rqstp, ffhp, S_IFDIR, NFSD_MAY_CREATE); in nfsd_link()
1614 err = fh_verify(rqstp, tfhp, 0, NFSD_MAY_NOP); in nfsd_link()
1653 if (host_err == -EXDEV && rqstp->rq_vers == 2) in nfsd_link()
1676 nfsd_rename(struct svc_rqst *rqstp, struct svc_fh *ffhp, char *fname, int flen, in nfsd_rename() argument
1684 err = fh_verify(rqstp, ffhp, S_IFDIR, NFSD_MAY_REMOVE); in nfsd_rename()
1687 err = fh_verify(rqstp, tfhp, S_IFDIR, NFSD_MAY_CREATE); in nfsd_rename()
1772 nfsd_unlink(struct svc_rqst *rqstp, struct svc_fh *fhp, int type, in nfsd_unlink() argument
1783 err = fh_verify(rqstp, fhp, S_IFDIR, NFSD_MAY_REMOVE); in nfsd_unlink()
1953 nfsd_readdir(struct svc_rqst *rqstp, struct svc_fh *fhp, loff_t *offsetp, in nfsd_readdir() argument
1962 if (rqstp->rq_vers > 2) in nfsd_readdir()
1965 err = nfsd_open(rqstp, fhp, S_IFDIR, may_flags, &file); in nfsd_readdir()
1990 nfsd_statfs(struct svc_rqst *rqstp, struct svc_fh *fhp, struct kstatfs *stat, int access) in nfsd_statfs() argument
1994 err = fh_verify(rqstp, fhp, 0, NFSD_MAY_NOP | access); in nfsd_statfs()
2006 static int exp_rdonly(struct svc_rqst *rqstp, struct svc_export *exp) in exp_rdonly() argument
2008 return nfsexp_flags(rqstp, exp) & NFSEXP_READONLY; in exp_rdonly()
2015 nfsd_permission(struct svc_rqst *rqstp, struct svc_export *exp, in nfsd_permission() argument
2047 if (exp_rdonly(rqstp, exp) || in nfsd_permission()