Lines Matching refs:fhp

173 nfsd_lookup_dentry(struct svc_rqst *rqstp, struct svc_fh *fhp,  in nfsd_lookup_dentry()  argument
182 dprintk("nfsd: nfsd_lookup(fh %s, %.*s)\n", SVCFH_fmt(fhp), len,name); in nfsd_lookup_dentry()
184 dparent = fhp->fh_dentry; in nfsd_lookup_dentry()
185 exp = exp_get(fhp->fh_export); in nfsd_lookup_dentry()
244 nfsd_lookup(struct svc_rqst *rqstp, struct svc_fh *fhp, const char *name, in nfsd_lookup() argument
251 err = fh_verify(rqstp, fhp, S_IFDIR, NFSD_MAY_EXEC); in nfsd_lookup()
254 err = nfsd_lookup_dentry(rqstp, fhp, name, len, &exp, &dentry); in nfsd_lookup()
264 err = fh_compose(resfh, exp, dentry, fhp); in nfsd_lookup()
287 commit_metadata(struct svc_fh *fhp) in commit_metadata() argument
289 struct inode *inode = d_inode(fhp->fh_dentry); in commit_metadata()
291 if (!EX_ISSYNC(fhp->fh_export)) in commit_metadata()
330 nfsd_get_write_access(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd_get_write_access() argument
333 struct inode *inode = d_inode(fhp->fh_dentry); in nfsd_get_write_access()
338 err = nfsd_permission(rqstp, fhp->fh_export, fhp->fh_dentry, in nfsd_get_write_access()
403 nfsd_setattr(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd_setattr() argument
437 get_write_count = !fhp->fh_dentry; in nfsd_setattr()
440 err = fh_verify(rqstp, fhp, ftype, accmode); in nfsd_setattr()
444 host_err = fh_want_write(fhp); in nfsd_setattr()
449 dentry = fhp->fh_dentry; in nfsd_setattr()
465 err = nfsd_get_write_access(rqstp, fhp, iap); in nfsd_setattr()
495 host_err = commit_metadata(fhp); in nfsd_setattr()
604 __be32 nfsd4_vfs_fallocate(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd4_vfs_fallocate() argument
615 error = commit_metadata(fhp); in nfsd4_vfs_fallocate()
676 nfsd_access(struct svc_rqst *rqstp, struct svc_fh *fhp, u32 *access, u32 *supported) in nfsd_access() argument
684 error = fh_verify(rqstp, fhp, 0, NFSD_MAY_NOP); in nfsd_access()
688 export = fhp->fh_export; in nfsd_access()
689 dentry = fhp->fh_dentry; in nfsd_access()
750 __nfsd_open(struct svc_rqst *rqstp, struct svc_fh *fhp, umode_t type, in __nfsd_open() argument
760 path.mnt = fhp->fh_export->ex_path.mnt; in __nfsd_open()
761 path.dentry = fhp->fh_dentry; in __nfsd_open()
807 nfsd_open(struct svc_rqst *rqstp, struct svc_fh *fhp, umode_t type, in nfsd_open() argument
828 err = fh_verify(rqstp, fhp, type, may_flags); in nfsd_open()
830 err = __nfsd_open(rqstp, fhp, type, may_flags, filp); in nfsd_open()
833 fh_put(fhp); in nfsd_open()
851 nfsd_open_verified(struct svc_rqst *rqstp, struct svc_fh *fhp, int may_flags, in nfsd_open_verified() argument
857 err = __nfsd_open(rqstp, fhp, S_IFREG, may_flags, filp); in nfsd_open_verified()
901 static __be32 nfsd_finish_read(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd_finish_read() argument
906 nfsd_stats_io_read_add(fhp->fh_export, host_err); in nfsd_finish_read()
910 trace_nfsd_read_io_done(rqstp, fhp, offset, *count); in nfsd_finish_read()
913 trace_nfsd_read_err(rqstp, fhp, offset, host_err); in nfsd_finish_read()
918 __be32 nfsd_splice_read(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd_splice_read() argument
930 trace_nfsd_read_splice(rqstp, fhp, offset, *count); in nfsd_splice_read()
933 return nfsd_finish_read(rqstp, fhp, file, offset, count, eof, host_err); in nfsd_splice_read()
936 __be32 nfsd_readv(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd_readv() argument
945 trace_nfsd_read_vector(rqstp, fhp, offset, *count); in nfsd_readv()
948 return nfsd_finish_read(rqstp, fhp, file, offset, count, eof, host_err); in nfsd_readv()
989 nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct nfsd_file *nf, in nfsd_vfs_write() argument
1009 trace_nfsd_write_opened(rqstp, fhp, offset, *cnt); in nfsd_vfs_write()
1027 exp = fhp->fh_export; in nfsd_vfs_write()
1063 trace_nfsd_write_io_done(rqstp, fhp, offset, *cnt); in nfsd_vfs_write()
1066 trace_nfsd_write_err(rqstp, fhp, offset, host_err); in nfsd_vfs_write()
1079 __be32 nfsd_read(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd_read() argument
1087 trace_nfsd_read_start(rqstp, fhp, offset, *count); in nfsd_read()
1088 err = nfsd_file_acquire_gc(rqstp, fhp, NFSD_MAY_READ, &nf); in nfsd_read()
1094 err = nfsd_splice_read(rqstp, fhp, file, offset, count, eof); in nfsd_read()
1096 err = nfsd_readv(rqstp, fhp, file, offset, vec, vlen, count, eof); in nfsd_read()
1100 trace_nfsd_read_done(rqstp, fhp, offset, *count); in nfsd_read()
1111 nfsd_write(struct svc_rqst *rqstp, struct svc_fh *fhp, loff_t offset, in nfsd_write() argument
1118 trace_nfsd_write_start(rqstp, fhp, offset, *cnt); in nfsd_write()
1120 err = nfsd_file_acquire_gc(rqstp, fhp, NFSD_MAY_WRITE, &nf); in nfsd_write()
1124 err = nfsd_vfs_write(rqstp, fhp, nf, offset, vec, in nfsd_write()
1128 trace_nfsd_write_done(rqstp, fhp, offset, *cnt); in nfsd_write()
1153 nfsd_commit(struct svc_rqst *rqstp, struct svc_fh *fhp, struct nfsd_file *nf, in nfsd_commit() argument
1169 maxbytes = (u64)fhp->fh_dentry->d_sb->s_maxbytes; in nfsd_commit()
1177 if (EX_ISSYNC(fhp->fh_export)) { in nfsd_commit()
1213 nfsd_create_setattr(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd_create_setattr() argument
1247 status = nfserrno(commit_metadata(fhp)); in nfsd_create_setattr()
1275 nfsd_create_locked(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd_create_locked() argument
1285 dentry = fhp->fh_dentry; in nfsd_create_locked()
1289 err = nfsd_permission(rqstp, fhp->fh_export, dentry, NFSD_MAY_CREATE); in nfsd_create_locked()
1348 err = nfsd_create_setattr(rqstp, fhp, resfhp, attrs); in nfsd_create_locked()
1366 nfsd_create(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd_create() argument
1377 err = fh_verify(rqstp, fhp, S_IFDIR, NFSD_MAY_NOP); in nfsd_create()
1381 dentry = fhp->fh_dentry; in nfsd_create()
1383 host_err = fh_want_write(fhp); in nfsd_create()
1394 err = fh_compose(resfhp, fhp->fh_export, dchild, fhp); in nfsd_create()
1402 fh_fill_pre_attrs(fhp); in nfsd_create()
1403 err = nfsd_create_locked(rqstp, fhp, attrs, type, rdev, resfhp); in nfsd_create()
1404 fh_fill_post_attrs(fhp); in nfsd_create()
1416 nfsd_readlink(struct svc_rqst *rqstp, struct svc_fh *fhp, char *buf, int *lenp) in nfsd_readlink() argument
1424 err = fh_verify(rqstp, fhp, S_IFLNK, NFSD_MAY_NOP); in nfsd_readlink()
1428 path.mnt = fhp->fh_export->ex_path.mnt; in nfsd_readlink()
1429 path.dentry = fhp->fh_dentry; in nfsd_readlink()
1463 nfsd_symlink(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd_symlink() argument
1479 err = fh_verify(rqstp, fhp, S_IFDIR, NFSD_MAY_CREATE); in nfsd_symlink()
1483 host_err = fh_want_write(fhp); in nfsd_symlink()
1489 dentry = fhp->fh_dentry; in nfsd_symlink()
1497 fh_fill_pre_attrs(fhp); in nfsd_symlink()
1500 cerr = fh_compose(resfhp, fhp->fh_export, dnew, fhp); in nfsd_symlink()
1502 nfsd_create_setattr(rqstp, fhp, resfhp, attrs); in nfsd_symlink()
1503 fh_fill_post_attrs(fhp); in nfsd_symlink()
1506 err = nfserrno(commit_metadata(fhp)); in nfsd_symlink()
1510 fh_drop_write(fhp); in nfsd_symlink()
1743 nfsd_unlink(struct svc_rqst *rqstp, struct svc_fh *fhp, int type, in nfsd_unlink() argument
1755 err = fh_verify(rqstp, fhp, S_IFDIR, NFSD_MAY_REMOVE); in nfsd_unlink()
1759 host_err = fh_want_write(fhp); in nfsd_unlink()
1763 dentry = fhp->fh_dentry; in nfsd_unlink()
1783 fh_fill_pre_attrs(fhp); in nfsd_unlink()
1800 fh_fill_post_attrs(fhp); in nfsd_unlink()
1804 host_err = commit_metadata(fhp); in nfsd_unlink()
1809 fh_drop_write(fhp); in nfsd_unlink()
1876 static __be32 nfsd_buffered_readdir(struct file *file, struct svc_fh *fhp, in nfsd_buffered_readdir() argument
1924 trace_nfsd_dirent(fhp, de->ino, de->name, de->namlen); in nfsd_buffered_readdir()
1951 nfsd_readdir(struct svc_rqst *rqstp, struct svc_fh *fhp, loff_t *offsetp, in nfsd_readdir() argument
1963 err = nfsd_open(rqstp, fhp, S_IFDIR, may_flags, &file); in nfsd_readdir()
1973 err = nfsd_buffered_readdir(file, fhp, func, cdp, offsetp); in nfsd_readdir()
1988 nfsd_statfs(struct svc_rqst *rqstp, struct svc_fh *fhp, struct kstatfs *stat, int access) in nfsd_statfs() argument
1992 err = fh_verify(rqstp, fhp, 0, NFSD_MAY_NOP | access); in nfsd_statfs()
1995 .mnt = fhp->fh_export->ex_path.mnt, in nfsd_statfs()
1996 .dentry = fhp->fh_dentry, in nfsd_statfs()
2051 nfsd_getxattr(struct svc_rqst *rqstp, struct svc_fh *fhp, char *name, in nfsd_getxattr() argument
2060 err = fh_verify(rqstp, fhp, 0, NFSD_MAY_READ); in nfsd_getxattr()
2065 dentry = fhp->fh_dentry; in nfsd_getxattr()
2124 nfsd_listxattr(struct svc_rqst *rqstp, struct svc_fh *fhp, char **bufp, in nfsd_listxattr() argument
2133 err = fh_verify(rqstp, fhp, 0, NFSD_MAY_READ); in nfsd_listxattr()
2137 dentry = fhp->fh_dentry; in nfsd_listxattr()
2192 nfsd_removexattr(struct svc_rqst *rqstp, struct svc_fh *fhp, char *name) in nfsd_removexattr() argument
2197 err = fh_verify(rqstp, fhp, 0, NFSD_MAY_WRITE); in nfsd_removexattr()
2201 ret = fh_want_write(fhp); in nfsd_removexattr()
2205 inode_lock(fhp->fh_dentry->d_inode); in nfsd_removexattr()
2206 fh_fill_pre_attrs(fhp); in nfsd_removexattr()
2208 ret = __vfs_removexattr_locked(&init_user_ns, fhp->fh_dentry, in nfsd_removexattr()
2211 fh_fill_post_attrs(fhp); in nfsd_removexattr()
2212 inode_unlock(fhp->fh_dentry->d_inode); in nfsd_removexattr()
2213 fh_drop_write(fhp); in nfsd_removexattr()
2219 nfsd_setxattr(struct svc_rqst *rqstp, struct svc_fh *fhp, char *name, in nfsd_setxattr() argument
2225 err = fh_verify(rqstp, fhp, 0, NFSD_MAY_WRITE); in nfsd_setxattr()
2229 ret = fh_want_write(fhp); in nfsd_setxattr()
2232 inode_lock(fhp->fh_dentry->d_inode); in nfsd_setxattr()
2233 fh_fill_pre_attrs(fhp); in nfsd_setxattr()
2235 ret = __vfs_setxattr_locked(&init_user_ns, fhp->fh_dentry, name, buf, in nfsd_setxattr()
2237 fh_fill_post_attrs(fhp); in nfsd_setxattr()
2238 inode_unlock(fhp->fh_dentry->d_inode); in nfsd_setxattr()
2239 fh_drop_write(fhp); in nfsd_setxattr()