Lines Matching refs:dentry

91 struct dentry {  struct
96 struct dentry *d_parent; /* parent directory */ argument
149 struct dentry *, unsigned int);
150 int (*d_weak_revalidate)(struct dentry *, unsigned int);
151 int (*d_hash)(const struct dentry *, struct qstr *);
152 int (*d_compare)(const struct dentry *,
154 int (*d_delete)(const struct dentry *);
155 int (*d_init)(struct dentry *);
156 void (*d_release)(struct dentry *);
157 void (*d_prune)(struct dentry *);
158 void (*d_iput)(struct dentry *, struct inode *);
159 char *(*d_dname)(struct dentry *, char *, int);
162 struct dentry *(*d_real)(struct dentry *, enum d_real_type type);
163 bool (*d_unalias_trylock)(const struct dentry *);
164 void (*d_unalias_unlock)(const struct dentry *);
234 extern void d_instantiate(struct dentry *, struct inode *);
235 extern void d_instantiate_new(struct dentry *, struct inode *);
236 extern void __d_drop(struct dentry *dentry);
237 extern void d_drop(struct dentry *dentry);
238 extern void d_delete(struct dentry *);
239 extern void d_set_d_op(struct dentry *dentry, const struct dentry_operations *op);
242 extern struct dentry * d_alloc(struct dentry *, const struct qstr *);
243 extern struct dentry * d_alloc_anon(struct super_block *);
244 extern struct dentry * d_alloc_parallel(struct dentry *, const struct qstr *,
246 extern struct dentry * d_splice_alias(struct inode *, struct dentry *);
247 extern struct dentry * d_add_ci(struct dentry *, struct inode *, struct qstr *);
248 extern bool d_same_name(const struct dentry *dentry, const struct dentry *parent,
250 extern struct dentry *d_find_any_alias(struct inode *inode);
251 extern struct dentry * d_obtain_alias(struct inode *);
252 extern struct dentry * d_obtain_root(struct inode *);
254 extern void shrink_dcache_parent(struct dentry *);
255 extern void d_invalidate(struct dentry *);
258 extern struct dentry * d_make_root(struct inode *);
263 extern struct dentry *d_find_alias(struct inode *);
266 extern struct dentry *d_find_alias_rcu(struct inode *);
274 extern void d_rehash(struct dentry *);
276 extern void d_add(struct dentry *, struct inode *);
279 extern void d_move(struct dentry *, struct dentry *);
280 extern void d_exchange(struct dentry *, struct dentry *);
281 extern struct dentry *d_ancestor(struct dentry *, struct dentry *);
283 extern struct dentry *d_lookup(const struct dentry *, const struct qstr *);
284 extern struct dentry *d_hash_and_lookup(struct dentry *, struct qstr *);
286 static inline unsigned d_count(const struct dentry *dentry) in d_count() argument
288 return dentry->d_lockref.count; in d_count()
291 ino_t d_parent_ino(struct dentry *dentry);
302 extern char *dentry_path_raw(const struct dentry *, char *, int);
303 extern char *dentry_path(const struct dentry *, char *, int);
317 static inline struct dentry *dget_dlock(struct dentry *dentry) in dget_dlock() argument
319 dentry->d_lockref.count++; in dget_dlock()
320 return dentry; in dget_dlock()
342 static inline struct dentry *dget(struct dentry *dentry) in dget() argument
344 if (dentry) in dget()
345 lockref_get(&dentry->d_lockref); in dget()
346 return dentry; in dget()
349 extern struct dentry *dget_parent(struct dentry *dentry);
357 static inline int d_unhashed(const struct dentry *dentry) in d_unhashed() argument
359 return hlist_bl_unhashed(&dentry->d_hash); in d_unhashed()
362 static inline int d_unlinked(const struct dentry *dentry) in d_unlinked() argument
364 return d_unhashed(dentry) && !IS_ROOT(dentry); in d_unlinked()
367 static inline int cant_mount(const struct dentry *dentry) in cant_mount() argument
369 return (dentry->d_flags & DCACHE_CANT_MOUNT); in cant_mount()
372 static inline void dont_mount(struct dentry *dentry) in dont_mount() argument
374 spin_lock(&dentry->d_lock); in dont_mount()
375 dentry->d_flags |= DCACHE_CANT_MOUNT; in dont_mount()
376 spin_unlock(&dentry->d_lock); in dont_mount()
379 extern void __d_lookup_unhash_wake(struct dentry *dentry);
381 static inline int d_in_lookup(const struct dentry *dentry) in d_in_lookup() argument
383 return dentry->d_flags & DCACHE_PAR_LOOKUP; in d_in_lookup()
386 static inline void d_lookup_done(struct dentry *dentry) in d_lookup_done() argument
388 if (unlikely(d_in_lookup(dentry))) in d_lookup_done()
389 __d_lookup_unhash_wake(dentry); in d_lookup_done()
392 extern void dput(struct dentry *);
394 static inline bool d_managed(const struct dentry *dentry) in d_managed() argument
396 return dentry->d_flags & DCACHE_MANAGED_DENTRY; in d_managed()
399 static inline bool d_mountpoint(const struct dentry *dentry) in d_mountpoint() argument
401 return dentry->d_flags & DCACHE_MOUNTED; in d_mountpoint()
407 static inline unsigned __d_entry_type(const struct dentry *dentry) in __d_entry_type() argument
409 return dentry->d_flags & DCACHE_ENTRY_TYPE; in __d_entry_type()
412 static inline bool d_is_miss(const struct dentry *dentry) in d_is_miss() argument
414 return __d_entry_type(dentry) == DCACHE_MISS_TYPE; in d_is_miss()
417 static inline bool d_is_whiteout(const struct dentry *dentry) in d_is_whiteout() argument
419 return __d_entry_type(dentry) == DCACHE_WHITEOUT_TYPE; in d_is_whiteout()
422 static inline bool d_can_lookup(const struct dentry *dentry) in d_can_lookup() argument
424 return __d_entry_type(dentry) == DCACHE_DIRECTORY_TYPE; in d_can_lookup()
427 static inline bool d_is_autodir(const struct dentry *dentry) in d_is_autodir() argument
429 return __d_entry_type(dentry) == DCACHE_AUTODIR_TYPE; in d_is_autodir()
432 static inline bool d_is_dir(const struct dentry *dentry) in d_is_dir() argument
434 return d_can_lookup(dentry) || d_is_autodir(dentry); in d_is_dir()
437 static inline bool d_is_symlink(const struct dentry *dentry) in d_is_symlink() argument
439 return __d_entry_type(dentry) == DCACHE_SYMLINK_TYPE; in d_is_symlink()
442 static inline bool d_is_reg(const struct dentry *dentry) in d_is_reg() argument
444 return __d_entry_type(dentry) == DCACHE_REGULAR_TYPE; in d_is_reg()
447 static inline bool d_is_special(const struct dentry *dentry) in d_is_special() argument
449 return __d_entry_type(dentry) == DCACHE_SPECIAL_TYPE; in d_is_special()
452 static inline bool d_is_file(const struct dentry *dentry) in d_is_file() argument
454 return d_is_reg(dentry) || d_is_special(dentry); in d_is_file()
457 static inline bool d_is_negative(const struct dentry *dentry) in d_is_negative() argument
460 return d_is_miss(dentry); in d_is_negative()
468 static inline bool d_is_positive(const struct dentry *dentry) in d_is_positive() argument
470 return !d_is_negative(dentry); in d_is_positive()
488 static inline bool d_really_is_negative(const struct dentry *dentry) in d_really_is_negative() argument
490 return dentry->d_inode == NULL; in d_really_is_negative()
506 static inline bool d_really_is_positive(const struct dentry *dentry) in d_really_is_positive() argument
508 return dentry->d_inode != NULL; in d_really_is_positive()
511 static inline int simple_positive(const struct dentry *dentry) in simple_positive() argument
513 return d_really_is_positive(dentry) && !d_unhashed(dentry); in simple_positive()
525 static inline struct inode *d_inode(const struct dentry *dentry) in d_inode() argument
527 return dentry->d_inode; in d_inode()
537 static inline struct inode *d_inode_rcu(const struct dentry *dentry) in d_inode_rcu() argument
539 return READ_ONCE(dentry->d_inode); in d_inode_rcu()
552 static inline struct inode *d_backing_inode(const struct dentry *upper) in d_backing_inode()
569 static inline struct dentry *d_real(struct dentry *dentry, enum d_real_type type) in d_real() argument
571 if (unlikely(dentry->d_flags & DCACHE_OP_REAL)) in d_real()
572 return dentry->d_op->d_real(dentry, type); in d_real()
574 return dentry; in d_real()
584 static inline struct inode *d_real_inode(const struct dentry *dentry) in d_real_inode() argument
587 return d_inode(d_real((struct dentry *) dentry, D_REAL_DATA)); in d_real_inode()
594 void take_dentry_name_snapshot(struct name_snapshot *, struct dentry *);
597 static inline struct dentry *d_first_child(const struct dentry *dentry) in d_first_child() argument
599 return hlist_entry_safe(dentry->d_children.first, struct dentry, d_sib); in d_first_child()
602 static inline struct dentry *d_next_sibling(const struct dentry *dentry) in d_next_sibling() argument
604 return hlist_entry_safe(dentry->d_sib.next, struct dentry, d_sib); in d_next_sibling()