Lines Matching refs:dentry

82 struct dentry {  struct
87 struct dentry *d_parent; /* parent directory */ argument
129 int (*d_revalidate)(struct dentry *, unsigned int);
130 int (*d_weak_revalidate)(struct dentry *, unsigned int);
131 int (*d_hash)(const struct dentry *, struct qstr *);
132 int (*d_compare)(const struct dentry *,
134 int (*d_delete)(const struct dentry *);
135 int (*d_init)(struct dentry *);
136 void (*d_release)(struct dentry *);
137 void (*d_prune)(struct dentry *);
138 void (*d_iput)(struct dentry *, struct inode *);
139 char *(*d_dname)(struct dentry *, char *, int);
142 struct dentry *(*d_real)(struct dentry *, const struct inode *);
221 extern void d_instantiate(struct dentry *, struct inode *);
222 extern void d_instantiate_new(struct dentry *, struct inode *);
223 extern struct dentry * d_instantiate_unique(struct dentry *, struct inode *);
224 extern struct dentry * d_instantiate_anon(struct dentry *, struct inode *);
225 extern void __d_drop(struct dentry *dentry);
226 extern void d_drop(struct dentry *dentry);
227 extern void d_delete(struct dentry *);
228 extern void d_set_d_op(struct dentry *dentry, const struct dentry_operations *op);
231 extern struct dentry * d_alloc(struct dentry *, const struct qstr *);
232 extern struct dentry * d_alloc_anon(struct super_block *);
233 extern struct dentry * d_alloc_parallel(struct dentry *, const struct qstr *,
235 extern struct dentry * d_splice_alias(struct inode *, struct dentry *);
236 extern struct dentry * d_add_ci(struct dentry *, struct inode *, struct qstr *);
237 extern bool d_same_name(const struct dentry *dentry, const struct dentry *parent,
239 extern struct dentry * d_exact_alias(struct dentry *, struct inode *);
240 extern struct dentry *d_find_any_alias(struct inode *inode);
241 extern struct dentry * d_obtain_alias(struct inode *);
242 extern struct dentry * d_obtain_root(struct inode *);
244 extern void shrink_dcache_parent(struct dentry *);
246 extern void d_invalidate(struct dentry *);
249 extern struct dentry * d_make_root(struct inode *);
252 extern void d_genocide(struct dentry *);
256 extern struct dentry *d_find_alias(struct inode *);
259 extern struct dentry *d_find_alias_rcu(struct inode *);
267 extern void d_rehash(struct dentry *);
269 extern void d_add(struct dentry *, struct inode *);
272 extern void d_move(struct dentry *, struct dentry *);
273 extern void d_exchange(struct dentry *, struct dentry *);
274 extern struct dentry *d_ancestor(struct dentry *, struct dentry *);
277 extern struct dentry *d_lookup(const struct dentry *, const struct qstr *);
278 extern struct dentry *d_hash_and_lookup(struct dentry *, struct qstr *);
279 extern struct dentry *__d_lookup(const struct dentry *, const struct qstr *);
280 extern struct dentry *__d_lookup_rcu(const struct dentry *parent,
283 static inline unsigned d_count(const struct dentry *dentry) in d_count() argument
285 return dentry->d_lockref.count; in d_count()
297 extern char *dentry_path_raw(const struct dentry *, char *, int);
298 extern char *dentry_path(const struct dentry *, char *, int);
310 static inline struct dentry *dget_dlock(struct dentry *dentry) in dget_dlock() argument
312 if (dentry) in dget_dlock()
313 dentry->d_lockref.count++; in dget_dlock()
314 return dentry; in dget_dlock()
317 static inline struct dentry *dget(struct dentry *dentry) in dget() argument
319 if (dentry) in dget()
320 lockref_get(&dentry->d_lockref); in dget()
321 return dentry; in dget()
324 extern struct dentry *dget_parent(struct dentry *dentry);
333 static inline int d_unhashed(const struct dentry *dentry) in d_unhashed() argument
335 return hlist_bl_unhashed(&dentry->d_hash); in d_unhashed()
338 static inline int d_unlinked(const struct dentry *dentry) in d_unlinked() argument
340 return d_unhashed(dentry) && !IS_ROOT(dentry); in d_unlinked()
343 static inline int cant_mount(const struct dentry *dentry) in cant_mount() argument
345 return (dentry->d_flags & DCACHE_CANT_MOUNT); in cant_mount()
348 static inline void dont_mount(struct dentry *dentry) in dont_mount() argument
350 spin_lock(&dentry->d_lock); in dont_mount()
351 dentry->d_flags |= DCACHE_CANT_MOUNT; in dont_mount()
352 spin_unlock(&dentry->d_lock); in dont_mount()
355 extern void __d_lookup_unhash_wake(struct dentry *dentry);
357 static inline int d_in_lookup(const struct dentry *dentry) in d_in_lookup() argument
359 return dentry->d_flags & DCACHE_PAR_LOOKUP; in d_in_lookup()
362 static inline void d_lookup_done(struct dentry *dentry) in d_lookup_done() argument
364 if (unlikely(d_in_lookup(dentry))) in d_lookup_done()
365 __d_lookup_unhash_wake(dentry); in d_lookup_done()
368 extern void dput(struct dentry *);
370 static inline bool d_managed(const struct dentry *dentry) in d_managed() argument
372 return dentry->d_flags & DCACHE_MANAGED_DENTRY; in d_managed()
375 static inline bool d_mountpoint(const struct dentry *dentry) in d_mountpoint() argument
377 return dentry->d_flags & DCACHE_MOUNTED; in d_mountpoint()
383 static inline unsigned __d_entry_type(const struct dentry *dentry) in __d_entry_type() argument
385 return dentry->d_flags & DCACHE_ENTRY_TYPE; in __d_entry_type()
388 static inline bool d_is_miss(const struct dentry *dentry) in d_is_miss() argument
390 return __d_entry_type(dentry) == DCACHE_MISS_TYPE; in d_is_miss()
393 static inline bool d_is_whiteout(const struct dentry *dentry) in d_is_whiteout() argument
395 return __d_entry_type(dentry) == DCACHE_WHITEOUT_TYPE; in d_is_whiteout()
398 static inline bool d_can_lookup(const struct dentry *dentry) in d_can_lookup() argument
400 return __d_entry_type(dentry) == DCACHE_DIRECTORY_TYPE; in d_can_lookup()
403 static inline bool d_is_autodir(const struct dentry *dentry) in d_is_autodir() argument
405 return __d_entry_type(dentry) == DCACHE_AUTODIR_TYPE; in d_is_autodir()
408 static inline bool d_is_dir(const struct dentry *dentry) in d_is_dir() argument
410 return d_can_lookup(dentry) || d_is_autodir(dentry); in d_is_dir()
413 static inline bool d_is_symlink(const struct dentry *dentry) in d_is_symlink() argument
415 return __d_entry_type(dentry) == DCACHE_SYMLINK_TYPE; in d_is_symlink()
418 static inline bool d_is_reg(const struct dentry *dentry) in d_is_reg() argument
420 return __d_entry_type(dentry) == DCACHE_REGULAR_TYPE; in d_is_reg()
423 static inline bool d_is_special(const struct dentry *dentry) in d_is_special() argument
425 return __d_entry_type(dentry) == DCACHE_SPECIAL_TYPE; in d_is_special()
428 static inline bool d_is_file(const struct dentry *dentry) in d_is_file() argument
430 return d_is_reg(dentry) || d_is_special(dentry); in d_is_file()
433 static inline bool d_is_negative(const struct dentry *dentry) in d_is_negative() argument
436 return d_is_miss(dentry); in d_is_negative()
444 static inline bool d_is_positive(const struct dentry *dentry) in d_is_positive() argument
446 return !d_is_negative(dentry); in d_is_positive()
464 static inline bool d_really_is_negative(const struct dentry *dentry) in d_really_is_negative() argument
466 return dentry->d_inode == NULL; in d_really_is_negative()
482 static inline bool d_really_is_positive(const struct dentry *dentry) in d_really_is_positive() argument
484 return dentry->d_inode != NULL; in d_really_is_positive()
487 static inline int simple_positive(const struct dentry *dentry) in simple_positive() argument
489 return d_really_is_positive(dentry) && !d_unhashed(dentry); in simple_positive()
492 extern void d_set_fallthru(struct dentry *dentry);
494 static inline bool d_is_fallthru(const struct dentry *dentry) in d_is_fallthru() argument
496 return dentry->d_flags & DCACHE_FALLTHRU; in d_is_fallthru()
514 static inline struct inode *d_inode(const struct dentry *dentry) in d_inode() argument
516 return dentry->d_inode; in d_inode()
526 static inline struct inode *d_inode_rcu(const struct dentry *dentry) in d_inode_rcu() argument
528 return READ_ONCE(dentry->d_inode); in d_inode_rcu()
541 static inline struct inode *d_backing_inode(const struct dentry *upper) in d_backing_inode()
558 static inline struct dentry *d_backing_dentry(struct dentry *upper) in d_backing_dentry()
573 static inline struct dentry *d_real(struct dentry *dentry, in d_real() argument
576 if (unlikely(dentry->d_flags & DCACHE_OP_REAL)) in d_real()
577 return dentry->d_op->d_real(dentry, inode); in d_real()
579 return dentry; in d_real()
589 static inline struct inode *d_real_inode(const struct dentry *dentry) in d_real_inode() argument
592 return d_backing_inode(d_real((struct dentry *) dentry, NULL)); in d_real_inode()
599 void take_dentry_name_snapshot(struct name_snapshot *, struct dentry *);