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
247 dentry = dget(exp->ex_path.dentry); in nfsd_set_fh_dentry()
249 dentry = exportfs_decode_fh_raw(exp->ex_path.mnt, fid, in nfsd_set_fh_dentry()
252 if (IS_ERR_OR_NULL(dentry)) { in nfsd_set_fh_dentry()
254 dentry ? PTR_ERR(dentry) : -ESTALE); in nfsd_set_fh_dentry()
255 switch (PTR_ERR(dentry)) { in nfsd_set_fh_dentry()
260 dentry = ERR_PTR(-ESTALE); in nfsd_set_fh_dentry()
264 if (dentry == NULL) in nfsd_set_fh_dentry()
266 if (IS_ERR(dentry)) { in nfsd_set_fh_dentry()
267 if (PTR_ERR(dentry) != -EINVAL) in nfsd_set_fh_dentry()
268 error = nfserrno(PTR_ERR(dentry)); in nfsd_set_fh_dentry()
272 if (d_is_dir(dentry) && in nfsd_set_fh_dentry()
273 (dentry->d_flags & DCACHE_DISCONNECTED)) { in nfsd_set_fh_dentry()
275 dentry); in nfsd_set_fh_dentry()
278 fhp->fh_dentry = dentry; in nfsd_set_fh_dentry()
283 if (dentry->d_sb->s_export_op->flags & EXPORT_OP_NOATOMIC_ATTR) in nfsd_set_fh_dentry()
287 if (dentry->d_sb->s_export_op->flags & EXPORT_OP_NOWCC) in nfsd_set_fh_dentry()
331 struct dentry *dentry; in fh_verify() local
341 dentry = fhp->fh_dentry; in fh_verify()
359 error = check_pseudo_root(rqstp, dentry, exp); in fh_verify()
367 error = nfsd_mode_check(rqstp, dentry, type); in fh_verify()
384 && exp->ex_path.dentry == dentry) in fh_verify()
393 error = nfsd_permission(rqstp, exp, dentry, access); in fh_verify()
398 dentry, in fh_verify()
416 struct dentry *dentry) in _fh_update() argument
418 if (dentry != exp->ex_path.dentry) { in _fh_update()
425 exportfs_encode_fh(dentry, fid, &maxsize, subtreecheck); in _fh_update()
434 return exp->ex_path.dentry == exp->ex_path.dentry->d_sb->s_root; in is_root_export()
439 return exp->ex_path.dentry->d_sb; in exp_sb()
522 fh_compose(struct svc_fh *fhp, struct svc_export *exp, struct dentry *dentry, in fh_compose() argument
530 struct inode * inode = d_inode(dentry); in fh_compose()
535 (long) d_inode(exp->ex_path.dentry)->i_ino, in fh_compose()
536 dentry, in fh_compose()
553 dentry); in fh_compose()
558 dentry); in fh_compose()
560 fhp->fh_dentry = dget(dentry); /* our internal copy */ in fh_compose()
570 d_inode(exp->ex_path.dentry)->i_ino, in fh_compose()
574 _fh_update(fhp, exp, dentry); in fh_compose()
590 struct dentry *dentry; in fh_update() local
595 dentry = fhp->fh_dentry; in fh_update()
596 if (d_really_is_negative(dentry)) in fh_update()
601 _fh_update(fhp, fhp->fh_export, dentry); in fh_update()
610 dentry); in fh_update()
620 struct dentry * dentry = fhp->fh_dentry; in fh_put() local
622 if (dentry) { in fh_put()
625 dput(dentry); in fh_put()