Lines Matching refs:fhp

181 nfsd_lookup_dentry(struct svc_rqst *rqstp, struct svc_fh *fhp,  in nfsd_lookup_dentry()  argument
190 dprintk("nfsd: nfsd_lookup(fh %s, %.*s)\n", SVCFH_fmt(fhp), len,name); in nfsd_lookup_dentry()
192 dparent = fhp->fh_dentry; in nfsd_lookup_dentry()
193 exp = exp_get(fhp->fh_export); in nfsd_lookup_dentry()
215 fh_lock_nested(fhp, I_MUTEX_PARENT); 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()
272 err = fh_compose(resfh, exp, dentry, fhp); in nfsd_lookup()
285 commit_metadata(struct svc_fh *fhp) in commit_metadata() argument
287 struct inode *inode = d_inode(fhp->fh_dentry); in commit_metadata()
290 if (!EX_ISSYNC(fhp->fh_export)) in commit_metadata()
364 nfsd_get_write_access(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd_get_write_access() argument
367 struct inode *inode = d_inode(fhp->fh_dentry); in nfsd_get_write_access()
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
416 get_write_count = !fhp->fh_dentry; in nfsd_setattr()
419 err = fh_verify(rqstp, fhp, ftype, accmode); in nfsd_setattr()
423 host_err = fh_want_write(fhp); in nfsd_setattr()
428 dentry = fhp->fh_dentry; in nfsd_setattr()
445 err = nfsd_get_write_access(rqstp, fhp, iap); in nfsd_setattr()
468 fh_lock(fhp); in nfsd_setattr()
470 fh_unlock(fhp); in nfsd_setattr()
477 err = nfserrno(commit_metadata(fhp)); 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()
522 dentry = fhp->fh_dentry; 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()
553 error = commit_metadata(fhp); 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()
615 export = fhp->fh_export; in nfsd_access()
616 dentry = fhp->fh_dentry; 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()
707 path.mnt = fhp->fh_export->ex_path.mnt; in nfsd_open()
708 path.dentry = fhp->fh_dentry; in nfsd_open()
949 nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file, in nfsd_vfs_write() argument
974 exp = fhp->fh_export; 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()
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()
1132 if (EX_ISSYNC(fhp->fh_export)) { in nfsd_commit()
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()
1213 dentry = fhp->fh_dentry; in nfsd_create()
1224 host_err = fh_want_write(fhp); in nfsd_create()
1229 fh_lock_nested(fhp, I_MUTEX_PARENT); in nfsd_create()
1234 err = fh_compose(resfhp, fhp->fh_export, dchild, fhp); in nfsd_create()
1240 if (!fhp->fh_locked) { in nfsd_create()
1302 err2 = nfserrno(commit_metadata(fhp)); 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()
1355 dentry = fhp->fh_dentry; in do_nfsd_create()
1364 host_err = fh_want_write(fhp); in do_nfsd_create()
1368 fh_lock_nested(fhp, I_MUTEX_PARENT); in do_nfsd_create()
1380 err = fh_verify(rqstp, fhp, S_IFDIR, NFSD_MAY_CREATE); in do_nfsd_create()
1385 err = fh_compose(resfhp, fhp->fh_export, dchild, fhp); in do_nfsd_create()
1442 fh_drop_write(fhp); in do_nfsd_create()
1448 fh_drop_write(fhp); in do_nfsd_create()
1475 err = nfserrno(commit_metadata(fhp)); in do_nfsd_create()
1484 fh_unlock(fhp); in do_nfsd_create()
1487 fh_drop_write(fhp); 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()
1514 path.mnt = fhp->fh_export->ex_path.mnt; in nfsd_readlink()
1515 path.dentry = fhp->fh_dentry; 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()
1568 host_err = fh_want_write(fhp); in nfsd_symlink()
1572 fh_lock(fhp); in nfsd_symlink()
1573 dentry = fhp->fh_dentry; in nfsd_symlink()
1582 err = nfserrno(commit_metadata(fhp)); in nfsd_symlink()
1583 fh_unlock(fhp); in nfsd_symlink()
1585 fh_drop_write(fhp); in nfsd_symlink()
1587 cerr = fh_compose(resfhp, fhp->fh_export, dnew, fhp); in nfsd_symlink()
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()
1787 host_err = fh_want_write(fhp); in nfsd_unlink()
1791 fh_lock_nested(fhp, I_MUTEX_PARENT); in nfsd_unlink()
1792 dentry = fhp->fh_dentry; in nfsd_unlink()
1814 host_err = commit_metadata(fhp); in nfsd_unlink()
1953 nfsd_readdir(struct svc_rqst *rqstp, struct svc_fh *fhp, loff_t *offsetp, in nfsd_readdir() argument
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()
1997 .mnt = fhp->fh_export->ex_path.mnt, in nfsd_statfs()
1998 .dentry = fhp->fh_dentry, in nfsd_statfs()