Lines Matching refs:fhp
200 nfsd_lookup_dentry(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd_lookup_dentry() argument
209 dprintk("nfsd: nfsd_lookup(fh %s, %.*s)\n", SVCFH_fmt(fhp), len,name); in nfsd_lookup_dentry()
211 dparent = fhp->fh_dentry; in nfsd_lookup_dentry()
212 exp = exp_get(fhp->fh_export); in nfsd_lookup_dentry()
234 fh_lock_nested(fhp, I_MUTEX_PARENT); in nfsd_lookup_dentry()
248 fh_unlock(fhp); in nfsd_lookup_dentry()
277 nfsd_lookup(struct svc_rqst *rqstp, struct svc_fh *fhp, const char *name, in nfsd_lookup() argument
284 err = fh_verify(rqstp, fhp, S_IFDIR, NFSD_MAY_EXEC); in nfsd_lookup()
287 err = nfsd_lookup_dentry(rqstp, fhp, name, len, &exp, &dentry); in nfsd_lookup()
297 err = fh_compose(resfh, exp, dentry, fhp); in nfsd_lookup()
310 commit_metadata(struct svc_fh *fhp) in commit_metadata() argument
312 struct inode *inode = d_inode(fhp->fh_dentry); in commit_metadata()
315 if (!EX_ISSYNC(fhp->fh_export)) in commit_metadata()
353 nfsd_get_write_access(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd_get_write_access() argument
356 struct inode *inode = d_inode(fhp->fh_dentry); in nfsd_get_write_access()
362 err = nfsd_permission(rqstp, fhp->fh_export, fhp->fh_dentry, in nfsd_get_write_access()
387 nfsd_setattr(struct svc_rqst *rqstp, struct svc_fh *fhp, struct iattr *iap, in nfsd_setattr() argument
418 get_write_count = !fhp->fh_dentry; in nfsd_setattr()
421 err = fh_verify(rqstp, fhp, ftype, accmode); in nfsd_setattr()
425 host_err = fh_want_write(fhp); in nfsd_setattr()
430 dentry = fhp->fh_dentry; in nfsd_setattr()
453 err = nfsd_get_write_access(rqstp, fhp, iap); in nfsd_setattr()
458 fh_lock(fhp); in nfsd_setattr()
490 fh_unlock(fhp); in nfsd_setattr()
495 host_err = commit_metadata(fhp); in nfsd_setattr()
528 __be32 nfsd4_set_nfs4_label(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd4_set_nfs4_label() argument
535 error = fh_verify(rqstp, fhp, 0 /* S_IFREG */, NFSD_MAY_SATTR); in nfsd4_set_nfs4_label()
539 dentry = fhp->fh_dentry; in nfsd4_set_nfs4_label()
547 __be32 nfsd4_set_nfs4_label(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd4_set_nfs4_label() argument
577 __be32 nfsd4_vfs_fallocate(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd4_vfs_fallocate() argument
588 error = commit_metadata(fhp); in nfsd4_vfs_fallocate()
638 nfsd_access(struct svc_rqst *rqstp, struct svc_fh *fhp, u32 *access, u32 *supported) in nfsd_access() argument
646 error = fh_verify(rqstp, fhp, 0, NFSD_MAY_NOP); in nfsd_access()
650 export = fhp->fh_export; in nfsd_access()
651 dentry = fhp->fh_dentry; in nfsd_access()
713 nfsd_open(struct svc_rqst *rqstp, struct svc_fh *fhp, umode_t type, in nfsd_open() argument
738 err = fh_verify(rqstp, fhp, type, may_flags); in nfsd_open()
742 path.mnt = fhp->fh_export->ex_path.mnt; in nfsd_open()
743 path.dentry = fhp->fh_dentry; in nfsd_open()
898 static __be32 nfsd_finish_read(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd_finish_read() argument
906 trace_nfsd_read_io_done(rqstp, fhp, offset, *count); in nfsd_finish_read()
909 trace_nfsd_read_err(rqstp, fhp, offset, host_err); in nfsd_finish_read()
914 __be32 nfsd_splice_read(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd_splice_read() argument
925 trace_nfsd_read_splice(rqstp, fhp, offset, *count); in nfsd_splice_read()
928 return nfsd_finish_read(rqstp, fhp, file, offset, count, host_err); in nfsd_splice_read()
931 __be32 nfsd_readv(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd_readv() argument
938 trace_nfsd_read_vector(rqstp, fhp, offset, *count); in nfsd_readv()
941 return nfsd_finish_read(rqstp, fhp, file, offset, count, host_err); in nfsd_readv()
982 nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file, in nfsd_vfs_write() argument
995 trace_nfsd_write_opened(rqstp, fhp, offset, *cnt); in nfsd_vfs_write()
1006 exp = fhp->fh_export; in nfsd_vfs_write()
1028 trace_nfsd_write_io_done(rqstp, fhp, offset, *cnt); in nfsd_vfs_write()
1031 trace_nfsd_write_err(rqstp, fhp, offset, host_err); in nfsd_vfs_write()
1044 __be32 nfsd_read(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd_read() argument
1051 trace_nfsd_read_start(rqstp, fhp, offset, *count); in nfsd_read()
1052 err = nfsd_open(rqstp, fhp, S_IFREG, NFSD_MAY_READ, &file); in nfsd_read()
1059 err = nfsd_splice_read(rqstp, fhp, file, offset, count); in nfsd_read()
1061 err = nfsd_readv(rqstp, fhp, file, offset, vec, vlen, count); in nfsd_read()
1067 trace_nfsd_read_done(rqstp, fhp, offset, *count); in nfsd_read()
1078 nfsd_write(struct svc_rqst *rqstp, struct svc_fh *fhp, loff_t offset, in nfsd_write() argument
1084 trace_nfsd_write_start(rqstp, fhp, offset, *cnt); in nfsd_write()
1086 err = nfsd_open(rqstp, fhp, S_IFREG, NFSD_MAY_WRITE, &file); in nfsd_write()
1090 err = nfsd_vfs_write(rqstp, fhp, file, offset, vec, vlen, cnt, stable); in nfsd_write()
1093 trace_nfsd_write_done(rqstp, fhp, offset, *cnt); in nfsd_write()
1108 nfsd_commit(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd_commit() argument
1123 err = nfsd_open(rqstp, fhp, S_IFREG, in nfsd_commit()
1127 if (EX_ISSYNC(fhp->fh_export)) { in nfsd_commit()
1180 nfsd_create_locked(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd_create_locked() argument
1190 dentry = fhp->fh_dentry; in nfsd_create_locked()
1194 if (!fhp->fh_locked) { in nfsd_create_locked()
1201 err = nfsd_permission(rqstp, fhp->fh_export, dentry, NFSD_MAY_CREATE); in nfsd_create_locked()
1267 err2 = nfserrno(commit_metadata(fhp)); in nfsd_create_locked()
1291 nfsd_create(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd_create() argument
1303 err = fh_verify(rqstp, fhp, S_IFDIR, NFSD_MAY_NOP); in nfsd_create()
1307 dentry = fhp->fh_dentry; in nfsd_create()
1310 host_err = fh_want_write(fhp); in nfsd_create()
1314 fh_lock_nested(fhp, I_MUTEX_PARENT); in nfsd_create()
1319 err = fh_compose(resfhp, fhp->fh_export, dchild, fhp); in nfsd_create()
1327 return nfsd_create_locked(rqstp, fhp, fname, flen, iap, type, in nfsd_create()
1337 do_nfsd_create(struct svc_rqst *rqstp, struct svc_fh *fhp, in do_nfsd_create() argument
1356 err = fh_verify(rqstp, fhp, S_IFDIR, NFSD_MAY_EXEC); in do_nfsd_create()
1360 dentry = fhp->fh_dentry; in do_nfsd_create()
1363 host_err = fh_want_write(fhp); in do_nfsd_create()
1367 fh_lock_nested(fhp, I_MUTEX_PARENT); in do_nfsd_create()
1379 err = fh_verify(rqstp, fhp, S_IFDIR, NFSD_MAY_CREATE); in do_nfsd_create()
1384 err = fh_compose(resfhp, fhp->fh_export, dchild, fhp); in do_nfsd_create()
1441 fh_drop_write(fhp); in do_nfsd_create()
1450 fh_drop_write(fhp); in do_nfsd_create()
1477 err = nfserrno(commit_metadata(fhp)); in do_nfsd_create()
1486 fh_unlock(fhp); in do_nfsd_create()
1489 fh_drop_write(fhp); in do_nfsd_create()
1504 nfsd_readlink(struct svc_rqst *rqstp, struct svc_fh *fhp, char *buf, int *lenp) in nfsd_readlink() argument
1512 err = fh_verify(rqstp, fhp, S_IFLNK, NFSD_MAY_NOP); in nfsd_readlink()
1516 path.mnt = fhp->fh_export->ex_path.mnt; in nfsd_readlink()
1517 path.dentry = fhp->fh_dentry; in nfsd_readlink()
1541 nfsd_symlink(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd_symlink() argument
1557 err = fh_verify(rqstp, fhp, S_IFDIR, NFSD_MAY_CREATE); in nfsd_symlink()
1561 host_err = fh_want_write(fhp); in nfsd_symlink()
1565 fh_lock(fhp); in nfsd_symlink()
1566 dentry = fhp->fh_dentry; in nfsd_symlink()
1575 err = nfserrno(commit_metadata(fhp)); in nfsd_symlink()
1576 fh_unlock(fhp); in nfsd_symlink()
1578 fh_drop_write(fhp); in nfsd_symlink()
1580 cerr = fh_compose(resfhp, fhp->fh_export, dnew, fhp); in nfsd_symlink()
1765 nfsd_unlink(struct svc_rqst *rqstp, struct svc_fh *fhp, int type, in nfsd_unlink() argument
1776 err = fh_verify(rqstp, fhp, S_IFDIR, NFSD_MAY_REMOVE); in nfsd_unlink()
1780 host_err = fh_want_write(fhp); in nfsd_unlink()
1784 fh_lock_nested(fhp, I_MUTEX_PARENT); in nfsd_unlink()
1785 dentry = fhp->fh_dentry; in nfsd_unlink()
1807 host_err = commit_metadata(fhp); in nfsd_unlink()
1935 nfsd_readdir(struct svc_rqst *rqstp, struct svc_fh *fhp, loff_t *offsetp, in nfsd_readdir() argument
1947 err = nfsd_open(rqstp, fhp, S_IFDIR, may_flags, &file); in nfsd_readdir()
1972 nfsd_statfs(struct svc_rqst *rqstp, struct svc_fh *fhp, struct kstatfs *stat, int access) in nfsd_statfs() argument
1976 err = fh_verify(rqstp, fhp, 0, NFSD_MAY_NOP | access); in nfsd_statfs()
1979 .mnt = fhp->fh_export->ex_path.mnt, in nfsd_statfs()
1980 .dentry = fhp->fh_dentry, in nfsd_statfs()