Home
last modified time | relevance | path

Searched refs:fhp (Results 1 – 25 of 26) sorted by relevance

12

/linux/fs/nfsd/
H A Dnfsfh.c177 static bool fh_verify_mac(struct svc_fh *fhp, struct net *net) in fh_verify_mac() argument
180 struct knfsd_fh *fh = &fhp->fh_handle; in fh_verify_mac()
203 struct svc_fh *fhp) in nfsd_set_fh_dentry() argument
205 struct knfsd_fh *fh = &fhp->fh_handle; in nfsd_set_fh_dentry()
254 trace_nfsd_set_fh_dentry_badexport(rqstp, fhp, PTR_ERR(exp)); in nfsd_set_fh_dentry()
298 if (!fh_verify_mac(fhp, net)) { in nfsd_set_fh_dentry()
299 trace_nfsd_set_fh_dentry_badmac(rqstp, fhp, -ESTALE); in nfsd_set_fh_dentry()
309 trace_nfsd_set_fh_dentry_badhandle(rqstp, fhp, in nfsd_set_fh_dentry()
336 switch (fhp->fh_maxsize) { in nfsd_set_fh_dentry()
339 fhp->fh_no_atomic_attr = true; in nfsd_set_fh_dentry()
[all …]
H A Dvfs.c245 nfsd_lookup_dentry(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd_lookup_dentry() argument
254 trace_nfsd_vfs_lookup(rqstp, fhp, name, len); in nfsd_lookup_dentry()
256 dparent = fhp->fh_dentry; in nfsd_lookup_dentry()
257 exp = exp_get(fhp->fh_export); in nfsd_lookup_dentry()
317 nfsd_lookup(struct svc_rqst *rqstp, struct svc_fh *fhp, const char *name, in nfsd_lookup() argument
324 err = fh_verify(rqstp, fhp, S_IFDIR, NFSD_MAY_EXEC); in nfsd_lookup()
327 err = nfsd_lookup_dentry(rqstp, fhp, name, len, &exp, &dentry); in nfsd_lookup()
337 err = fh_compose(resfh, exp, dentry, fhp); in nfsd_lookup()
378 commit_metadata(struct svc_fh *fhp) in commit_metadata() argument
380 struct inode *inode = d_inode(fhp->fh_dentry); in commit_metadata()
[all …]
H A Dnfsfh.h136 extern enum fsid_source fsid_source(const struct svc_fh *fhp);
219 extern char * SVCFH_fmt(struct svc_fh *fhp);
227 __be32 fh_getattr(const struct svc_fh *fhp, struct kstat *stat);
250 fh_init(struct svc_fh *fhp, int maxsize) in fh_init() argument
252 memset(fhp, 0, sizeof(*fhp)); in fh_init()
253 fhp->fh_maxsize = maxsize; in fh_init()
254 return fhp; in fh_init()
291 static inline int fh_want_write(struct svc_fh *fhp) in fh_want_write() argument
295 if (fhp->fh_want_write) in fh_want_write()
297 ret = mnt_want_write(fhp->fh_export->ex_path.mnt); in fh_want_write()
[all …]
H A Dvfs.h104 __be32 nfsd_create_setattr(struct svc_rqst *rqstp, struct svc_fh *fhp,
106 __be32 nfsd_commit(struct svc_rqst *rqst, struct svc_fh *fhp,
110 __be32 nfsd_getxattr(struct svc_rqst *rqstp, struct svc_fh *fhp,
112 __be32 nfsd_listxattr(struct svc_rqst *rqstp, struct svc_fh *fhp,
114 __be32 nfsd_removexattr(struct svc_rqst *rqstp, struct svc_fh *fhp,
116 __be32 nfsd_setxattr(struct svc_rqst *rqstp, struct svc_fh *fhp,
122 int nfsd_open_verified(struct svc_fh *fhp, umode_t type, int may_flags,
124 __be32 nfsd_splice_read(struct svc_rqst *rqstp, struct svc_fh *fhp,
128 __be32 nfsd_iter_read(struct svc_rqst *rqstp, struct svc_fh *fhp,
133 __be32 nfsd_read(struct svc_rqst *rqstp, struct svc_fh *fhp,
[all …]
H A Dnfs3xdr.c81 svcxdr_decode_nfs_fh3(struct xdr_stream *xdr, struct svc_fh *fhp) in svcxdr_decode_nfs_fh3() argument
93 fh_init(fhp, NFS3_FHSIZE); in svcxdr_decode_nfs_fh3()
94 fhp->fh_handle.fh_size = size; in svcxdr_decode_nfs_fh3()
95 memcpy(&fhp->fh_handle.fh_raw, p, size); in svcxdr_decode_nfs_fh3()
123 svcxdr_encode_nfs_fh3(struct xdr_stream *xdr, const struct svc_fh *fhp) in svcxdr_encode_nfs_fh3() argument
125 u32 size = fhp->fh_handle.fh_size; in svcxdr_encode_nfs_fh3()
134 memcpy(p, &fhp->fh_handle.fh_raw, size); in svcxdr_encode_nfs_fh3()
140 svcxdr_encode_post_op_fh3(struct xdr_stream *xdr, const struct svc_fh *fhp) in svcxdr_encode_post_op_fh3() argument
144 if (!svcxdr_encode_nfs_fh3(xdr, fhp)) in svcxdr_encode_post_op_fh3()
202 svcxdr_decode_diropargs3(struct xdr_stream *xdr, struct svc_fh *fhp, in svcxdr_decode_diropargs3() argument
[all …]
H A Dfilecache.h78 __be32 nfsd_file_acquire_gc(struct svc_rqst *rqstp, struct svc_fh *fhp,
80 __be32 nfsd_file_acquire(struct svc_rqst *rqstp, struct svc_fh *fhp,
82 __be32 nfsd_file_acquire_opened(struct svc_rqst *rqstp, struct svc_fh *fhp,
86 struct auth_domain *client, struct svc_fh *fhp,
88 __be32 nfsd_file_acquire_dir(struct svc_rqst *rqstp, struct svc_fh *fhp,
H A Dnfsxdr.c71 svcxdr_decode_fhandle(struct xdr_stream *xdr, struct svc_fh *fhp) in svcxdr_decode_fhandle() argument
78 fh_init(fhp, NFS_FHSIZE); in svcxdr_decode_fhandle()
79 memcpy(&fhp->fh_handle.fh_raw, p, NFS_FHSIZE); in svcxdr_decode_fhandle()
80 fhp->fh_handle.fh_size = NFS_FHSIZE; in svcxdr_decode_fhandle()
86 svcxdr_encode_fhandle(struct xdr_stream *xdr, const struct svc_fh *fhp) in svcxdr_encode_fhandle() argument
93 memcpy(p, &fhp->fh_handle.fh_raw, NFS_FHSIZE); in svcxdr_encode_fhandle()
134 svcxdr_decode_diropargs(struct xdr_stream *xdr, struct svc_fh *fhp, in svcxdr_decode_diropargs() argument
137 return svcxdr_decode_fhandle(xdr, fhp) && in svcxdr_decode_diropargs()
229 const struct svc_fh *fhp, const struct kstat *stat) in svcxdr_encode_fattr() argument
232 struct dentry *dentry = fhp->fh_dentry; in svcxdr_encode_fattr()
[all …]
H A Dfilecache.c1141 nfsd_file_get_dio_attrs(const struct svc_fh *fhp, struct nfsd_file *nf) in nfsd_file_get_dio_attrs() argument
1151 status = fh_getattr(fhp, &stat); in nfsd_file_get_dio_attrs()
1173 struct svc_fh *fhp, in nfsd_file_do_acquire() argument
1187 status = fh_verify(rqstp, fhp, type, in nfsd_file_do_acquire()
1190 status = fh_verify_local(net, cred, client, fhp, type, in nfsd_file_do_acquire()
1195 inode = d_inode(fhp->fh_dentry); in nfsd_file_do_acquire()
1243 fh_put(fhp); in nfsd_file_do_acquire()
1274 ret = nfsd_open_verified(fhp, type, may_flags, &nf->nf_file); in nfsd_file_do_acquire()
1283 fh_put(fhp); in nfsd_file_do_acquire()
1289 status = nfsd_file_get_dio_attrs(fhp, nf); in nfsd_file_do_acquire()
[all …]
H A Dtrace.h268 const struct svc_fh *fhp,
272 TP_ARGS(rqstp, fhp, type, access),
291 __entry->fh_hash = knfsd_fh_hash(&fhp->fh_handle);
292 __entry->inode = d_inode(fhp->fh_dentry);
306 const struct svc_fh *fhp,
311 TP_ARGS(rqstp, fhp, type, access, error),
331 __entry->fh_hash = knfsd_fh_hash(&fhp->fh_handle);
332 if (fhp->fh_dentry)
333 __entry->inode = d_inode(fhp->fh_dentry);
350 struct svc_fh *fhp,
[all …]
H A Dflexfilelayout.c24 const struct svc_fh *fhp, struct nfsd4_layoutget *args) in nfsd4_ff_proc_layoutget() argument
60 error = nfsd4_set_deviceid(&fl->deviceid, fhp, device_generation); in nfsd4_ff_proc_layoutget()
64 fl->fh.size = fhp->fh_handle.fh_size; in nfsd4_ff_proc_layoutget()
65 memcpy(fl->fh.data, &fhp->fh_handle.fh_raw, fl->fh.size); in nfsd4_ff_proc_layoutget()
H A Dnfs4layouts.c58 nfsd4_alloc_devid_map(const struct svc_fh *fhp) in nfsd4_alloc_devid_map() argument
60 const struct knfsd_fh *fh = &fhp->fh_handle; in nfsd4_alloc_devid_map()
73 if (fhp->fh_export->ex_devid_map) in nfsd4_alloc_devid_map()
84 fhp->fh_export->ex_devid_map = old; in nfsd4_alloc_devid_map()
91 fhp->fh_export->ex_devid_map = map; in nfsd4_alloc_devid_map()
114 nfsd4_set_deviceid(struct nfsd4_deviceid *id, const struct svc_fh *fhp, in nfsd4_set_deviceid() argument
117 if (!fhp->fh_export->ex_devid_map) { in nfsd4_set_deviceid()
118 nfsd4_alloc_devid_map(fhp); in nfsd4_set_deviceid()
119 if (!fhp->fh_export->ex_devid_map) in nfsd4_set_deviceid()
123 id->fsid_idx = fhp->fh_export->ex_devid_map->idx; in nfsd4_set_deviceid()
H A Dnfs3proc.c277 nfsd3_create_file(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd3_create_file() argument
290 trace_nfsd_vfs_create(rqstp, fhp, S_IFREG, argp->name, argp->len); in nfsd3_create_file()
299 status = fh_verify(rqstp, fhp, S_IFDIR, NFSD_MAY_EXEC); in nfsd3_create_file()
303 parent = fhp->fh_dentry; in nfsd3_create_file()
306 host_err = fh_want_write(fhp); in nfsd3_create_file()
318 status = fh_verify(rqstp, fhp, S_IFDIR, NFSD_MAY_CREATE); in nfsd3_create_file()
323 status = fh_compose(resfhp, fhp->fh_export, child, fhp); in nfsd3_create_file()
367 status = fh_fill_pre_attrs(fhp); in nfsd3_create_file()
375 fh_fill_post_attrs(fhp); in nfsd3_create_file()
390 status = nfsd_create_setattr(rqstp, fhp, resfhp, &attrs); in nfsd3_create_file()
[all …]
H A Dxdr.h173 bool svcxdr_decode_fhandle(struct xdr_stream *xdr, struct svc_fh *fhp);
176 const struct svc_fh *fhp, const struct kstat *stat);
H A Dnfs4proc.c206 nfsd4_vfs_create(struct svc_fh *fhp, struct dentry **child, in nfsd4_vfs_create() argument
228 path.mnt = fhp->fh_export->ex_path.mnt; in nfsd4_vfs_create()
249 nfsd4_create_file(struct svc_rqst *rqstp, struct svc_fh *fhp, in nfsd4_create_file() argument
268 status = fh_verify(rqstp, fhp, S_IFDIR, NFSD_MAY_EXEC); in nfsd4_create_file()
271 parent = fhp->fh_dentry; in nfsd4_create_file()
274 host_err = fh_want_write(fhp); in nfsd4_create_file()
305 status = fh_verify(rqstp, fhp, S_IFDIR, NFSD_MAY_CREATE); in nfsd4_create_file()
331 status = fh_fill_both_attrs(fhp); in nfsd4_create_file()
335 status = fh_compose(resfhp, fhp->fh_export, child, fhp); in nfsd4_create_file()
380 status = fh_fill_pre_attrs(fhp); in nfsd4_create_file()
[all …]
H A Dnfsproc.c84 struct svc_fh *fhp; in nfsd_proc_setattr() local
91 fhp = fh_copy(&resp->fh, &argp->fh); in nfsd_proc_setattr()
117 resp->status = fh_verify(rqstp, fhp, 0, NFSD_MAY_NOP); in nfsd_proc_setattr()
121 hosterr = fh_want_write(fhp); in nfsd_proc_setattr()
130 setattr_prepare(&nop_mnt_idmap, fhp->fh_dentry, iap) != 0) { in nfsd_proc_setattr()
140 resp->status = nfsd_setattr(rqstp, fhp, &attrs, NULL); in nfsd_proc_setattr()
H A Dxdr3.h310 bool svcxdr_decode_nfs_fh3(struct xdr_stream *xdr, struct svc_fh *fhp);
313 const struct svc_fh *fhp);
H A Dnfs4xdr.c3941 struct svc_fh *fhp, struct svc_export *exp, in nfsd4_encode_fattr4() argument
4039 if (!fhp) { in nfsd4_encode_fattr4()
4048 fhp = tempfh; in nfsd4_encode_fattr4()
4050 fh_copy_shallow(&args.fhandle, &fhp->fh_handle); in nfsd4_encode_fattr4()
4223 struct knfsd_fh *fhp = &args->fhandle; in setup_notify_fhandle() local
4243 fhp->fh_size = 4 + fsid_len; in setup_notify_fhandle()
4246 memcpy(&fhp->fh_raw, &fi->fi_fhandle.fh_raw, fhp->fh_size); in setup_notify_fhandle()
4248 fid = (struct fid *)(fh_fsid(fhp) + fsid_len/4); in setup_notify_fhandle()
4249 maxsize = (NFS4_FHSIZE - fhp->fh_size)/4; in setup_notify_fhandle()
4267 fhp->fh_fileid_type = fileid_type; in setup_notify_fhandle()
[all …]
H A Dnfs4state.c5939 nfsd4_file_hash_lookup(const struct svc_fh *fhp) in nfsd4_file_hash_lookup() argument
5941 struct inode *inode = d_inode(fhp->fh_dentry); in nfsd4_file_hash_lookup()
5949 if (fh_match(&fi->fi_fhandle, &fhp->fh_handle)) { in nfsd4_file_hash_lookup()
5969 nfsd4_file_hash_insert(struct nfs4_file *new, const struct svc_fh *fhp) in nfsd4_file_hash_insert() argument
5971 struct inode *inode = d_inode(fhp->fh_dentry); in nfsd4_file_hash_insert()
5984 if (fh_match(&fi->fi_fhandle, &fhp->fh_handle)) { in nfsd4_file_hash_insert()
5993 nfsd4_file_init(fhp, new); in nfsd4_file_hash_insert()
7814 static inline __be32 nfs4_check_fh(struct svc_fh *fhp, struct nfs4_stid *stp) in nfs4_check_fh() argument
7816 if (!fh_match(&fhp->fh_handle, &stp->sc_file->fi_fhandle)) in nfs4_check_fh()
8028 nfs4_check_file(struct svc_rqst *rqstp, struct svc_fh *fhp, struct nfs4_stid *s, in nfs4_check_file() argument
[all …]
H A Dstate.h881 struct nfsd4_compound_state *cstate, struct svc_fh *fhp,
H A Dxdr4.h980 struct svc_fh *fhp, struct svc_export *exp,
H A Dexport.c2032 exp_pseudoroot(struct svc_rqst *rqstp, struct svc_fh *fhp) in exp_pseudoroot() argument
2040 rv = fh_compose(fhp, exp, exp->ex_path.dentry, NULL); in exp_pseudoroot()
/linux/drivers/media/usb/pvrusb2/
H A Dpvrusb2-v4l2.c888 struct pvr2_v4l2_fh *fhp = to_pvr2_v4l2_fh(file); in pvr2_v4l2_release() local
889 struct pvr2_v4l2 *vp = fhp->pdi->v4lp; in pvr2_v4l2_release()
890 struct pvr2_hdw *hdw = fhp->channel.mc_head->hdw; in pvr2_v4l2_release()
894 if (fhp->rhp) { in pvr2_v4l2_release()
897 sp = pvr2_ioread_get_stream(fhp->rhp); in pvr2_v4l2_release()
899 pvr2_ioread_destroy(fhp->rhp); in pvr2_v4l2_release()
900 fhp->rhp = NULL; in pvr2_v4l2_release()
903 v4l2_fh_del(&fhp->fh, file); in pvr2_v4l2_release()
904 v4l2_fh_exit(&fhp->fh); in pvr2_v4l2_release()
906 pvr2_channel_done(&fhp->channel); in pvr2_v4l2_release()
[all …]
/linux/tools/testing/selftests/bpf/
H A Dcgroup_helpers.c480 struct file_handle *fhp, *fhp2; in get_cgroup_id_from_path() local
485 fhsize = sizeof(*fhp); in get_cgroup_id_from_path()
486 fhp = calloc(1, fhsize); in get_cgroup_id_from_path()
487 if (!fhp) { in get_cgroup_id_from_path()
491 err = name_to_handle_at(dirfd, cgroup_workdir, fhp, &mount_id, flags); in get_cgroup_id_from_path()
492 if (err >= 0 || fhp->handle_bytes != 8) { in get_cgroup_id_from_path()
497 fhsize = sizeof(struct file_handle) + fhp->handle_bytes; in get_cgroup_id_from_path()
498 fhp2 = realloc(fhp, fhsize); in get_cgroup_id_from_path()
504 fhp = fhp2; in get_cgroup_id_from_path()
510 memcpy(id.raw_bytes, fhp->f_handle, 8); in get_cgroup_id_from_path()
[all …]
/linux/fs/lockd/
H A Dsvcsubs.c38 u32 *fhp = (u32*)f->data; in nlm_debug_print_fh() local
42 msg, fhp[0], fhp[1], fhp[2], fhp[3], in nlm_debug_print_fh()
43 fhp[4], fhp[5], fhp[6], fhp[7]); in nlm_debug_print_fh()
/linux/tools/testing/selftests/mm/
H A Dhugetlb-madvise.c24 unsigned long fhp = hugetlb_free_default_pages(); \
25 if (fhp != (exp_free)) \
28 fhp, (exp_free), __LINE__); \

12