Lines Matching refs:fhp

173 nfsd_lookup_dentry(struct svc_rqst *rqstp, struct svc_fh *fhp,
182 dprintk("nfsd: nfsd_lookup(fh %s, %.*s)\n", SVCFH_fmt(fhp), len,name);
184 dparent = fhp->fh_dentry;
185 exp = exp_get(fhp->fh_export);
207 fh_lock_nested(fhp, I_MUTEX_PARENT);
221 fh_unlock(fhp);
239 * N.B. After this call _both_ fhp and resfh need an fh_put
250 nfsd_lookup(struct svc_rqst *rqstp, struct svc_fh *fhp, const char *name,
257 err = fh_verify(rqstp, fhp, S_IFDIR, NFSD_MAY_EXEC);
260 err = nfsd_lookup_dentry(rqstp, fhp, name, len, &exp, &dentry);
270 err = fh_compose(resfh, exp, dentry, fhp);
293 commit_metadata(struct svc_fh *fhp)
295 struct inode *inode = d_inode(fhp->fh_dentry);
297 if (!EX_ISSYNC(fhp->fh_export))
332 nfsd_get_write_access(struct svc_rqst *rqstp, struct svc_fh *fhp,
335 struct inode *inode = d_inode(fhp->fh_dentry);
341 err = nfsd_permission(rqstp, fhp->fh_export, fhp->fh_dentry,
363 * Set various file attributes. After this call fhp needs an fh_put.
366 nfsd_setattr(struct svc_rqst *rqstp, struct svc_fh *fhp, struct iattr *iap,
397 get_write_count = !fhp->fh_dentry;
400 err = fh_verify(rqstp, fhp, ftype, accmode);
404 host_err = fh_want_write(fhp);
409 dentry = fhp->fh_dentry;
432 err = nfsd_get_write_access(rqstp, fhp, iap);
437 fh_lock(fhp);
469 fh_unlock(fhp);
474 host_err = commit_metadata(fhp);
507 __be32 nfsd4_set_nfs4_label(struct svc_rqst *rqstp, struct svc_fh *fhp,
514 error = fh_verify(rqstp, fhp, 0 /* S_IFREG */, NFSD_MAY_SATTR);
518 dentry = fhp->fh_dentry;
526 __be32 nfsd4_set_nfs4_label(struct svc_rqst *rqstp, struct svc_fh *fhp,
592 __be32 nfsd4_vfs_fallocate(struct svc_rqst *rqstp, struct svc_fh *fhp,
603 error = commit_metadata(fhp);
665 nfsd_access(struct svc_rqst *rqstp, struct svc_fh *fhp, u32 *access, u32 *supported)
673 error = fh_verify(rqstp, fhp, 0, NFSD_MAY_NOP);
677 export = fhp->fh_export;
678 dentry = fhp->fh_dentry;
737 * N.B. After this call fhp needs an fh_put
740 __nfsd_open(struct svc_rqst *rqstp, struct svc_fh *fhp, umode_t type,
750 path.mnt = fhp->fh_export->ex_path.mnt;
751 path.dentry = fhp->fh_dentry;
807 nfsd_open(struct svc_rqst *rqstp, struct svc_fh *fhp, umode_t type,
826 err = fh_verify(rqstp, fhp, type, may_flags);
828 err = __nfsd_open(rqstp, fhp, type, may_flags, filp);
834 nfsd_open_verified(struct svc_rqst *rqstp, struct svc_fh *fhp, umode_t type,
840 err = __nfsd_open(rqstp, fhp, type, may_flags, filp);
895 static __be32 nfsd_finish_read(struct svc_rqst *rqstp, struct svc_fh *fhp,
904 trace_nfsd_read_io_done(rqstp, fhp, offset, *count);
907 trace_nfsd_read_err(rqstp, fhp, offset, host_err);
912 __be32 nfsd_splice_read(struct svc_rqst *rqstp, struct svc_fh *fhp,
924 trace_nfsd_read_splice(rqstp, fhp, offset, *count);
927 return nfsd_finish_read(rqstp, fhp, file, offset, count, eof, host_err);
930 __be32 nfsd_readv(struct svc_rqst *rqstp, struct svc_fh *fhp,
939 trace_nfsd_read_vector(rqstp, fhp, offset, *count);
942 return nfsd_finish_read(rqstp, fhp, file, offset, count, eof, host_err);
983 nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct nfsd_file *nf,
999 trace_nfsd_write_opened(rqstp, fhp, offset, *cnt);
1011 exp = fhp->fh_export;
1059 trace_nfsd_write_io_done(rqstp, fhp, offset, *cnt);
1062 trace_nfsd_write_err(rqstp, fhp, offset, host_err);
1073 * N.B. After this call fhp needs an fh_put
1075 __be32 nfsd_read(struct svc_rqst *rqstp, struct svc_fh *fhp,
1083 trace_nfsd_read_start(rqstp, fhp, offset, *count);
1084 err = nfsd_file_acquire(rqstp, fhp, NFSD_MAY_READ, &nf);
1090 err = nfsd_splice_read(rqstp, fhp, file, offset, count, eof);
1092 err = nfsd_readv(rqstp, fhp, file, offset, vec, vlen, count, eof);
1096 trace_nfsd_read_done(rqstp, fhp, offset, *count);
1104 * N.B. After this call fhp needs an fh_put
1107 nfsd_write(struct svc_rqst *rqstp, struct svc_fh *fhp, loff_t offset,
1114 trace_nfsd_write_start(rqstp, fhp, offset, *cnt);
1116 err = nfsd_file_acquire(rqstp, fhp, NFSD_MAY_WRITE, &nf);
1120 err = nfsd_vfs_write(rqstp, fhp, nf, offset, vec,
1124 trace_nfsd_write_done(rqstp, fhp, offset, *cnt);
1139 nfsd_commit(struct svc_rqst *rqstp, struct svc_fh *fhp,
1154 err = nfsd_file_acquire(rqstp, fhp,
1158 if (EX_ISSYNC(fhp->fh_export)) {
1227 nfsd_create_locked(struct svc_rqst *rqstp, struct svc_fh *fhp,
1237 dentry = fhp->fh_dentry;
1241 if (!fhp->fh_locked) {
1248 err = nfsd_permission(rqstp, fhp->fh_export, dentry, NFSD_MAY_CREATE);
1314 err2 = nfserrno(commit_metadata(fhp));
1335 * N.B. Every call to nfsd_create needs an fh_put for _both_ fhp and resfhp
1338 nfsd_create(struct svc_rqst *rqstp, struct svc_fh *fhp,
1349 err = fh_verify(rqstp, fhp, S_IFDIR, NFSD_MAY_NOP);
1353 dentry = fhp->fh_dentry;
1355 host_err = fh_want_write(fhp);
1359 fh_lock_nested(fhp, I_MUTEX_PARENT);
1364 err = fh_compose(resfhp, fhp->fh_export, dchild, fhp);
1372 return nfsd_create_locked(rqstp, fhp, fname, flen, iap, type,
1382 do_nfsd_create(struct svc_rqst *rqstp, struct svc_fh *fhp,
1401 err = fh_verify(rqstp, fhp, S_IFDIR, NFSD_MAY_EXEC);
1405 dentry = fhp->fh_dentry;
1408 host_err = fh_want_write(fhp);
1412 fh_lock_nested(fhp, I_MUTEX_PARENT);
1424 err = fh_verify(rqstp, fhp, S_IFDIR, NFSD_MAY_CREATE);
1429 err = fh_compose(resfhp, fhp->fh_export, dchild, fhp);
1487 fh_drop_write(fhp);
1496 fh_drop_write(fhp);
1523 err = nfserrno(commit_metadata(fhp));
1532 fh_unlock(fhp);
1535 fh_drop_write(fhp);
1547 * N.B. After this call fhp needs an fh_put
1550 nfsd_readlink(struct svc_rqst *rqstp, struct svc_fh *fhp, char *buf, int *lenp)
1558 err = fh_verify(rqstp, fhp, S_IFLNK, NFSD_MAY_NOP);
1562 path.mnt = fhp->fh_export->ex_path.mnt;
1563 path.dentry = fhp->fh_dentry;
1584 * N.B. After this call _both_ fhp and resfhp need an fh_put
1587 nfsd_symlink(struct svc_rqst *rqstp, struct svc_fh *fhp,
1603 err = fh_verify(rqstp, fhp, S_IFDIR, NFSD_MAY_CREATE);
1607 host_err = fh_want_write(fhp);
1611 fh_lock(fhp);
1612 dentry = fhp->fh_dentry;
1621 err = nfserrno(commit_metadata(fhp));
1622 fh_unlock(fhp);
1624 fh_drop_write(fhp);
1626 cerr = fh_compose(resfhp, fhp->fh_export, dnew, fhp);
1849 * N.B. After this call fhp needs an fh_put
1852 nfsd_unlink(struct svc_rqst *rqstp, struct svc_fh *fhp, int type,
1863 err = fh_verify(rqstp, fhp, S_IFDIR, NFSD_MAY_REMOVE);
1867 host_err = fh_want_write(fhp);
1871 fh_lock_nested(fhp, I_MUTEX_PARENT);
1872 dentry = fhp->fh_dentry;
1897 host_err = commit_metadata(fhp);
1901 fh_drop_write(fhp);
2037 nfsd_readdir(struct svc_rqst *rqstp, struct svc_fh *fhp, loff_t *offsetp,
2049 err = nfsd_open(rqstp, fhp, S_IFDIR, may_flags, &file);
2071 * N.B. After this call fhp needs an fh_put
2074 nfsd_statfs(struct svc_rqst *rqstp, struct svc_fh *fhp, struct kstatfs *stat, int access)
2078 err = fh_verify(rqstp, fhp, 0, NFSD_MAY_NOP | access);
2081 .mnt = fhp->fh_export->ex_path.mnt,
2082 .dentry = fhp->fh_dentry,
2137 nfsd_getxattr(struct svc_rqst *rqstp, struct svc_fh *fhp, char *name,
2146 err = fh_verify(rqstp, fhp, 0, NFSD_MAY_READ);
2151 dentry = fhp->fh_dentry;
2210 nfsd_listxattr(struct svc_rqst *rqstp, struct svc_fh *fhp, char **bufp,
2219 err = fh_verify(rqstp, fhp, 0, NFSD_MAY_READ);
2223 dentry = fhp->fh_dentry;
2275 nfsd_removexattr(struct svc_rqst *rqstp, struct svc_fh *fhp, char *name)
2280 err = fh_verify(rqstp, fhp, 0, NFSD_MAY_WRITE);
2284 ret = fh_want_write(fhp);
2288 fh_lock(fhp);
2290 ret = __vfs_removexattr_locked(fhp->fh_dentry, name, NULL);
2292 fh_unlock(fhp);
2293 fh_drop_write(fhp);
2299 nfsd_setxattr(struct svc_rqst *rqstp, struct svc_fh *fhp, char *name,
2305 err = fh_verify(rqstp, fhp, 0, NFSD_MAY_WRITE);
2309 ret = fh_want_write(fhp);
2312 fh_lock(fhp);
2314 ret = __vfs_setxattr_locked(fhp->fh_dentry, name, buf, len, flags,
2317 fh_unlock(fhp);
2318 fh_drop_write(fhp);