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()
207 fh_lock_nested(fhp, I_MUTEX_PARENT); in nfsd_lookup_dentry()
221 fh_unlock(fhp); 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()
270 err = fh_compose(resfh, exp, dentry, fhp); in nfsd_lookup()
293 commit_metadata(struct svc_fh *fhp) in commit_metadata() argument
295 struct inode *inode = d_inode(fhp->fh_dentry); in commit_metadata()
297 if (!EX_ISSYNC(fhp->fh_export)) in commit_metadata()
332 nfsd_get_write_access(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd_get_write_access() argument
335 struct inode *inode = d_inode(fhp->fh_dentry); in nfsd_get_write_access()
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
397 get_write_count = !fhp->fh_dentry; in nfsd_setattr()
400 err = fh_verify(rqstp, fhp, ftype, accmode); in nfsd_setattr()
404 host_err = fh_want_write(fhp); in nfsd_setattr()
409 dentry = fhp->fh_dentry; in nfsd_setattr()
432 err = nfsd_get_write_access(rqstp, fhp, iap); in nfsd_setattr()
437 fh_lock(fhp); in nfsd_setattr()
469 fh_unlock(fhp); in nfsd_setattr()
474 host_err = commit_metadata(fhp); 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()
518 dentry = fhp->fh_dentry; 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
603 error = commit_metadata(fhp); in nfsd4_vfs_fallocate()
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()
677 export = fhp->fh_export; in nfsd_access()
678 dentry = fhp->fh_dentry; in nfsd_access()
740 __nfsd_open(struct svc_rqst *rqstp, struct svc_fh *fhp, umode_t type, in __nfsd_open() argument
750 path.mnt = fhp->fh_export->ex_path.mnt; in __nfsd_open()
751 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
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()
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
924 trace_nfsd_read_splice(rqstp, fhp, offset, *count); 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()
1011 exp = fhp->fh_export; 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()
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()
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()
1158 if (EX_ISSYNC(fhp->fh_export)) { in nfsd_commit()
1227 nfsd_create_locked(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd_create_locked() argument
1237 dentry = fhp->fh_dentry; in nfsd_create_locked()
1241 if (!fhp->fh_locked) { in nfsd_create_locked()
1248 err = nfsd_permission(rqstp, fhp->fh_export, dentry, NFSD_MAY_CREATE); in nfsd_create_locked()
1314 err2 = nfserrno(commit_metadata(fhp)); 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()
1353 dentry = fhp->fh_dentry; in nfsd_create()
1355 host_err = fh_want_write(fhp); in nfsd_create()
1359 fh_lock_nested(fhp, I_MUTEX_PARENT); in nfsd_create()
1364 err = fh_compose(resfhp, fhp->fh_export, dchild, fhp); 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()
1405 dentry = fhp->fh_dentry; in do_nfsd_create()
1408 host_err = fh_want_write(fhp); in do_nfsd_create()
1412 fh_lock_nested(fhp, I_MUTEX_PARENT); in do_nfsd_create()
1424 err = fh_verify(rqstp, fhp, S_IFDIR, NFSD_MAY_CREATE); in do_nfsd_create()
1429 err = fh_compose(resfhp, fhp->fh_export, dchild, fhp); in do_nfsd_create()
1487 fh_drop_write(fhp); in do_nfsd_create()
1496 fh_drop_write(fhp); in do_nfsd_create()
1523 err = nfserrno(commit_metadata(fhp)); in do_nfsd_create()
1532 fh_unlock(fhp); in do_nfsd_create()
1535 fh_drop_write(fhp); 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()
1562 path.mnt = fhp->fh_export->ex_path.mnt; in nfsd_readlink()
1563 path.dentry = fhp->fh_dentry; 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()
1607 host_err = fh_want_write(fhp); in nfsd_symlink()
1611 fh_lock(fhp); in nfsd_symlink()
1612 dentry = fhp->fh_dentry; in nfsd_symlink()
1621 err = nfserrno(commit_metadata(fhp)); in nfsd_symlink()
1622 fh_unlock(fhp); in nfsd_symlink()
1624 fh_drop_write(fhp); in nfsd_symlink()
1626 cerr = fh_compose(resfhp, fhp->fh_export, dnew, fhp); in nfsd_symlink()
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()
1867 host_err = fh_want_write(fhp); in nfsd_unlink()
1871 fh_lock_nested(fhp, I_MUTEX_PARENT); in nfsd_unlink()
1872 dentry = fhp->fh_dentry; in nfsd_unlink()
1897 host_err = commit_metadata(fhp); in nfsd_unlink()
1901 fh_drop_write(fhp); in nfsd_unlink()
2037 nfsd_readdir(struct svc_rqst *rqstp, struct svc_fh *fhp, loff_t *offsetp, in nfsd_readdir() argument
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()
2081 .mnt = fhp->fh_export->ex_path.mnt, in nfsd_statfs()
2082 .dentry = fhp->fh_dentry, in nfsd_statfs()
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()
2151 dentry = fhp->fh_dentry; 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()
2223 dentry = fhp->fh_dentry; 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()
2284 ret = fh_want_write(fhp); in nfsd_removexattr()
2288 fh_lock(fhp); in nfsd_removexattr()
2290 ret = __vfs_removexattr_locked(fhp->fh_dentry, name, NULL); in nfsd_removexattr()
2292 fh_unlock(fhp); in nfsd_removexattr()
2293 fh_drop_write(fhp); 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()
2309 ret = fh_want_write(fhp); in nfsd_setxattr()
2312 fh_lock(fhp); in nfsd_setxattr()
2314 ret = __vfs_setxattr_locked(fhp->fh_dentry, name, buf, len, flags, in nfsd_setxattr()
2317 fh_unlock(fhp); in nfsd_setxattr()
2318 fh_drop_write(fhp); in nfsd_setxattr()