Lines Matching refs:dentry

26 static int nfsd_acceptable(void *expv, struct dentry *dentry)  in nfsd_acceptable()  argument
30 struct dentry *tdentry; in nfsd_acceptable()
31 struct dentry *parent; in nfsd_acceptable()
36 tdentry = dget(dentry); in nfsd_acceptable()
37 while (tdentry != exp->ex_path.dentry && !IS_ROOT(tdentry)) { in nfsd_acceptable()
49 if (tdentry != exp->ex_path.dentry) in nfsd_acceptable()
51 rv = (tdentry == exp->ex_path.dentry); in nfsd_acceptable()
101 struct dentry *dentry, struct svc_export *exp) in check_pseudo_root() argument
117 if (unlikely(!d_is_dir(dentry) && in check_pseudo_root()
118 !d_is_symlink(dentry))) in check_pseudo_root()
125 if (unlikely(dentry != exp->ex_path.dentry)) in check_pseudo_root()
140 struct dentry *dentry; in nfsd_set_fh_dentry() local
248 dentry = dget(exp->ex_path.dentry); in nfsd_set_fh_dentry()
250 dentry = exportfs_decode_fh(exp->ex_path.mnt, fid, in nfsd_set_fh_dentry()
254 if (dentry == NULL) in nfsd_set_fh_dentry()
256 if (IS_ERR(dentry)) { in nfsd_set_fh_dentry()
257 if (PTR_ERR(dentry) != -EINVAL) in nfsd_set_fh_dentry()
258 error = nfserrno(PTR_ERR(dentry)); in nfsd_set_fh_dentry()
262 if (d_is_dir(dentry) && in nfsd_set_fh_dentry()
263 (dentry->d_flags & DCACHE_DISCONNECTED)) { in nfsd_set_fh_dentry()
265 dentry); in nfsd_set_fh_dentry()
268 fhp->fh_dentry = dentry; in nfsd_set_fh_dentry()
307 struct dentry *dentry; in fh_verify() local
317 dentry = fhp->fh_dentry; in fh_verify()
335 error = check_pseudo_root(rqstp, dentry, exp); in fh_verify()
343 error = nfsd_mode_check(rqstp, d_inode(dentry)->i_mode, type); in fh_verify()
360 && exp->ex_path.dentry == dentry) in fh_verify()
369 error = nfsd_permission(rqstp, exp, dentry, access); in fh_verify()
374 dentry, in fh_verify()
392 struct dentry *dentry) in _fh_update() argument
394 if (dentry != exp->ex_path.dentry) { in _fh_update()
401 exportfs_encode_fh(dentry, fid, &maxsize, subtreecheck); in _fh_update()
411 static inline void _fh_update_old(struct dentry *dentry, in _fh_update_old() argument
415 fh->ofh_ino = ino_t_to_u32(d_inode(dentry)->i_ino); in _fh_update_old()
416 fh->ofh_generation = d_inode(dentry)->i_generation; in _fh_update_old()
417 if (d_is_dir(dentry) || in _fh_update_old()
424 return exp->ex_path.dentry == exp->ex_path.dentry->d_sb->s_root; in is_root_export()
429 return d_inode(exp->ex_path.dentry)->i_sb; in exp_sb()
512 fh_compose(struct svc_fh *fhp, struct svc_export *exp, struct dentry *dentry, in fh_compose() argument
523 struct inode * inode = d_inode(dentry); in fh_compose()
528 (long) d_inode(exp->ex_path.dentry)->i_ino, in fh_compose()
529 dentry, in fh_compose()
543 dentry); in fh_compose()
548 dentry); in fh_compose()
550 fhp->fh_dentry = dget(dentry); /* our internal copy */ in fh_compose()
561 ino_t_to_u32(d_inode(exp->ex_path.dentry)->i_ino); in fh_compose()
562 fhp->fh_handle.ofh_dirino = ino_t_to_u32(parent_ino(dentry)); in fh_compose()
564 _fh_update_old(dentry, exp, &fhp->fh_handle); in fh_compose()
573 d_inode(exp->ex_path.dentry)->i_ino, in fh_compose()
577 _fh_update(fhp, exp, dentry); in fh_compose()
594 struct dentry *dentry; in fh_update() local
599 dentry = fhp->fh_dentry; in fh_update()
600 if (d_really_is_negative(dentry)) in fh_update()
603 _fh_update_old(dentry, fhp->fh_export, &fhp->fh_handle); in fh_update()
608 _fh_update(fhp, fhp->fh_export, dentry); in fh_update()
618 dentry); in fh_update()
628 struct dentry * dentry = fhp->fh_dentry; in fh_put() local
630 if (dentry) { in fh_put()
633 dput(dentry); in fh_put()