• Home
  • Raw
  • Download

Lines Matching refs:dentry

28 static int nfsd_acceptable(void *expv, struct dentry *dentry)  in nfsd_acceptable()  argument
32 struct dentry *tdentry; in nfsd_acceptable()
33 struct dentry *parent; in nfsd_acceptable()
38 tdentry = dget(dentry); in nfsd_acceptable()
39 while (tdentry != exp->ex_path.dentry && !IS_ROOT(tdentry)) { in nfsd_acceptable()
52 if (tdentry != exp->ex_path.dentry) in nfsd_acceptable()
54 rv = (tdentry == exp->ex_path.dentry); in nfsd_acceptable()
65 nfsd_mode_check(struct svc_rqst *rqstp, struct dentry *dentry, in nfsd_mode_check() argument
68 umode_t mode = d_inode(dentry)->i_mode & S_IFMT; in nfsd_mode_check()
73 if (mode == S_IFDIR && !d_can_lookup(dentry)) { in nfsd_mode_check()
120 struct dentry *dentry, struct svc_export *exp) in check_pseudo_root() argument
136 if (unlikely(!d_is_dir(dentry) && in check_pseudo_root()
137 !d_is_symlink(dentry))) in check_pseudo_root()
144 if (unlikely(dentry != exp->ex_path.dentry)) in check_pseudo_root()
159 struct dentry *dentry; in nfsd_set_fh_dentry() local
270 dentry = dget(exp->ex_path.dentry); in nfsd_set_fh_dentry()
272 dentry = exportfs_decode_fh_raw(exp->ex_path.mnt, fid, in nfsd_set_fh_dentry()
275 if (IS_ERR_OR_NULL(dentry)) { in nfsd_set_fh_dentry()
277 dentry ? PTR_ERR(dentry) : -ESTALE); in nfsd_set_fh_dentry()
278 switch (PTR_ERR(dentry)) { in nfsd_set_fh_dentry()
283 dentry = ERR_PTR(-ESTALE); in nfsd_set_fh_dentry()
287 if (dentry == NULL) in nfsd_set_fh_dentry()
289 if (IS_ERR(dentry)) { in nfsd_set_fh_dentry()
290 if (PTR_ERR(dentry) != -EINVAL) in nfsd_set_fh_dentry()
291 error = nfserrno(PTR_ERR(dentry)); in nfsd_set_fh_dentry()
295 if (d_is_dir(dentry) && in nfsd_set_fh_dentry()
296 (dentry->d_flags & DCACHE_DISCONNECTED)) { in nfsd_set_fh_dentry()
298 dentry); in nfsd_set_fh_dentry()
301 fhp->fh_dentry = dentry; in nfsd_set_fh_dentry()
306 if (dentry->d_sb->s_export_op->flags & EXPORT_OP_NOATOMIC_ATTR) in nfsd_set_fh_dentry()
310 if (dentry->d_sb->s_export_op->flags & EXPORT_OP_NOWCC) in nfsd_set_fh_dentry()
354 struct dentry *dentry; in fh_verify() local
364 dentry = fhp->fh_dentry; in fh_verify()
382 error = check_pseudo_root(rqstp, dentry, exp); in fh_verify()
390 error = nfsd_mode_check(rqstp, dentry, type); in fh_verify()
407 && exp->ex_path.dentry == dentry) in fh_verify()
416 error = nfsd_permission(rqstp, exp, dentry, access); in fh_verify()
421 dentry, in fh_verify()
439 struct dentry *dentry) in _fh_update() argument
441 if (dentry != exp->ex_path.dentry) { in _fh_update()
448 exportfs_encode_fh(dentry, fid, &maxsize, subtreecheck); in _fh_update()
458 static inline void _fh_update_old(struct dentry *dentry, in _fh_update_old() argument
462 fh->ofh_ino = ino_t_to_u32(d_inode(dentry)->i_ino); in _fh_update_old()
463 fh->ofh_generation = d_inode(dentry)->i_generation; in _fh_update_old()
464 if (d_is_dir(dentry) || in _fh_update_old()
471 return exp->ex_path.dentry == exp->ex_path.dentry->d_sb->s_root; in is_root_export()
476 return exp->ex_path.dentry->d_sb; in exp_sb()
559 fh_compose(struct svc_fh *fhp, struct svc_export *exp, struct dentry *dentry, in fh_compose() argument
570 struct inode * inode = d_inode(dentry); in fh_compose()
575 (long) d_inode(exp->ex_path.dentry)->i_ino, in fh_compose()
576 dentry, in fh_compose()
593 dentry); in fh_compose()
598 dentry); in fh_compose()
600 fhp->fh_dentry = dget(dentry); /* our internal copy */ in fh_compose()
611 ino_t_to_u32(d_inode(exp->ex_path.dentry)->i_ino); in fh_compose()
612 fhp->fh_handle.ofh_dirino = ino_t_to_u32(parent_ino(dentry)); in fh_compose()
614 _fh_update_old(dentry, exp, &fhp->fh_handle); in fh_compose()
623 d_inode(exp->ex_path.dentry)->i_ino, in fh_compose()
627 _fh_update(fhp, exp, dentry); in fh_compose()
644 struct dentry *dentry; in fh_update() local
649 dentry = fhp->fh_dentry; in fh_update()
650 if (d_really_is_negative(dentry)) in fh_update()
653 _fh_update_old(dentry, fhp->fh_export, &fhp->fh_handle); in fh_update()
658 _fh_update(fhp, fhp->fh_export, dentry); in fh_update()
668 dentry); in fh_update()
678 struct dentry * dentry = fhp->fh_dentry; in fh_put() local
680 if (dentry) { in fh_put()
683 dput(dentry); in fh_put()