Lines Matching refs:dentry
84 struct dentry { struct
89 struct dentry *d_parent; /* parent directory */ argument
144 int (*d_revalidate)(struct dentry *, unsigned int);
145 int (*d_weak_revalidate)(struct dentry *, unsigned int);
146 int (*d_hash)(const struct dentry *, struct qstr *);
147 int (*d_compare)(const struct dentry *,
149 int (*d_delete)(const struct dentry *);
150 int (*d_init)(struct dentry *);
151 void (*d_release)(struct dentry *);
152 void (*d_prune)(struct dentry *);
153 void (*d_iput)(struct dentry *, struct inode *);
154 char *(*d_dname)(struct dentry *, char *, int);
157 struct dentry *(*d_real)(struct dentry *, enum d_real_type type);
239 extern void d_instantiate(struct dentry *, struct inode *);
240 extern void d_instantiate_new(struct dentry *, struct inode *);
241 extern void __d_drop(struct dentry *dentry);
242 extern void d_drop(struct dentry *dentry);
243 extern void d_delete(struct dentry *);
244 extern void d_set_d_op(struct dentry *dentry, const struct dentry_operations *op);
247 extern struct dentry * d_alloc(struct dentry *, const struct qstr *);
248 extern struct dentry * d_alloc_anon(struct super_block *);
249 extern struct dentry * d_alloc_parallel(struct dentry *, const struct qstr *,
251 extern struct dentry * d_splice_alias(struct inode *, struct dentry *);
252 extern struct dentry * d_add_ci(struct dentry *, struct inode *, struct qstr *);
253 extern bool d_same_name(const struct dentry *dentry, const struct dentry *parent,
255 extern struct dentry * d_exact_alias(struct dentry *, struct inode *);
256 extern struct dentry *d_find_any_alias(struct inode *inode);
257 extern struct dentry * d_obtain_alias(struct inode *);
258 extern struct dentry * d_obtain_root(struct inode *);
260 extern void shrink_dcache_parent(struct dentry *);
261 extern void d_invalidate(struct dentry *);
264 extern struct dentry * d_make_root(struct inode *);
269 extern struct dentry *d_find_alias(struct inode *);
272 extern struct dentry *d_find_alias_rcu(struct inode *);
280 extern void d_rehash(struct dentry *);
282 extern void d_add(struct dentry *, struct inode *);
285 extern void d_move(struct dentry *, struct dentry *);
286 extern void d_exchange(struct dentry *, struct dentry *);
287 extern struct dentry *d_ancestor(struct dentry *, struct dentry *);
289 extern struct dentry *d_lookup(const struct dentry *, const struct qstr *);
290 extern struct dentry *d_hash_and_lookup(struct dentry *, struct qstr *);
292 static inline unsigned d_count(const struct dentry *dentry) in d_count() argument
294 return dentry->d_lockref.count; in d_count()
297 ino_t d_parent_ino(struct dentry *dentry);
308 extern char *dentry_path_raw(const struct dentry *, char *, int);
309 extern char *dentry_path(const struct dentry *, char *, int);
323 static inline struct dentry *dget_dlock(struct dentry *dentry) in dget_dlock() argument
325 dentry->d_lockref.count++; in dget_dlock()
326 return dentry; in dget_dlock()
348 static inline struct dentry *dget(struct dentry *dentry) in dget() argument
350 if (dentry) in dget()
351 lockref_get(&dentry->d_lockref); in dget()
352 return dentry; in dget()
355 extern struct dentry *dget_parent(struct dentry *dentry);
363 static inline int d_unhashed(const struct dentry *dentry) in d_unhashed() argument
365 return hlist_bl_unhashed(&dentry->d_hash); in d_unhashed()
368 static inline int d_unlinked(const struct dentry *dentry) in d_unlinked() argument
370 return d_unhashed(dentry) && !IS_ROOT(dentry); in d_unlinked()
373 static inline int cant_mount(const struct dentry *dentry) in cant_mount() argument
375 return (dentry->d_flags & DCACHE_CANT_MOUNT); in cant_mount()
378 static inline void dont_mount(struct dentry *dentry) in dont_mount() argument
380 spin_lock(&dentry->d_lock); in dont_mount()
381 dentry->d_flags |= DCACHE_CANT_MOUNT; in dont_mount()
382 spin_unlock(&dentry->d_lock); in dont_mount()
385 extern void __d_lookup_unhash_wake(struct dentry *dentry);
387 static inline int d_in_lookup(const struct dentry *dentry) in d_in_lookup() argument
389 return dentry->d_flags & DCACHE_PAR_LOOKUP; in d_in_lookup()
392 static inline void d_lookup_done(struct dentry *dentry) in d_lookup_done() argument
394 if (unlikely(d_in_lookup(dentry))) in d_lookup_done()
395 __d_lookup_unhash_wake(dentry); in d_lookup_done()
398 extern void dput(struct dentry *);
400 static inline bool d_managed(const struct dentry *dentry) in d_managed() argument
402 return dentry->d_flags & DCACHE_MANAGED_DENTRY; in d_managed()
405 static inline bool d_mountpoint(const struct dentry *dentry) in d_mountpoint() argument
407 return dentry->d_flags & DCACHE_MOUNTED; in d_mountpoint()
413 static inline unsigned __d_entry_type(const struct dentry *dentry) in __d_entry_type() argument
415 return dentry->d_flags & DCACHE_ENTRY_TYPE; in __d_entry_type()
418 static inline bool d_is_miss(const struct dentry *dentry) in d_is_miss() argument
420 return __d_entry_type(dentry) == DCACHE_MISS_TYPE; in d_is_miss()
423 static inline bool d_is_whiteout(const struct dentry *dentry) in d_is_whiteout() argument
425 return __d_entry_type(dentry) == DCACHE_WHITEOUT_TYPE; in d_is_whiteout()
428 static inline bool d_can_lookup(const struct dentry *dentry) in d_can_lookup() argument
430 return __d_entry_type(dentry) == DCACHE_DIRECTORY_TYPE; in d_can_lookup()
433 static inline bool d_is_autodir(const struct dentry *dentry) in d_is_autodir() argument
435 return __d_entry_type(dentry) == DCACHE_AUTODIR_TYPE; in d_is_autodir()
438 static inline bool d_is_dir(const struct dentry *dentry) in d_is_dir() argument
440 return d_can_lookup(dentry) || d_is_autodir(dentry); in d_is_dir()
443 static inline bool d_is_symlink(const struct dentry *dentry) in d_is_symlink() argument
445 return __d_entry_type(dentry) == DCACHE_SYMLINK_TYPE; in d_is_symlink()
448 static inline bool d_is_reg(const struct dentry *dentry) in d_is_reg() argument
450 return __d_entry_type(dentry) == DCACHE_REGULAR_TYPE; in d_is_reg()
453 static inline bool d_is_special(const struct dentry *dentry) in d_is_special() argument
455 return __d_entry_type(dentry) == DCACHE_SPECIAL_TYPE; in d_is_special()
458 static inline bool d_is_file(const struct dentry *dentry) in d_is_file() argument
460 return d_is_reg(dentry) || d_is_special(dentry); in d_is_file()
463 static inline bool d_is_negative(const struct dentry *dentry) in d_is_negative() argument
466 return d_is_miss(dentry); in d_is_negative()
474 static inline bool d_is_positive(const struct dentry *dentry) in d_is_positive() argument
476 return !d_is_negative(dentry); in d_is_positive()
494 static inline bool d_really_is_negative(const struct dentry *dentry) in d_really_is_negative() argument
496 return dentry->d_inode == NULL; in d_really_is_negative()
512 static inline bool d_really_is_positive(const struct dentry *dentry) in d_really_is_positive() argument
514 return dentry->d_inode != NULL; in d_really_is_positive()
517 static inline int simple_positive(const struct dentry *dentry) in simple_positive() argument
519 return d_really_is_positive(dentry) && !d_unhashed(dentry); in simple_positive()
536 static inline struct inode *d_inode(const struct dentry *dentry) in d_inode() argument
538 return dentry->d_inode; in d_inode()
548 static inline struct inode *d_inode_rcu(const struct dentry *dentry) in d_inode_rcu() argument
550 return READ_ONCE(dentry->d_inode); in d_inode_rcu()
563 static inline struct inode *d_backing_inode(const struct dentry *upper) in d_backing_inode()
580 static inline struct dentry *d_real(struct dentry *dentry, enum d_real_type type) in d_real() argument
582 if (unlikely(dentry->d_flags & DCACHE_OP_REAL)) in d_real()
583 return dentry->d_op->d_real(dentry, type); in d_real()
585 return dentry; in d_real()
595 static inline struct inode *d_real_inode(const struct dentry *dentry) in d_real_inode() argument
598 return d_inode(d_real((struct dentry *) dentry, D_REAL_DATA)); in d_real_inode()
605 void take_dentry_name_snapshot(struct name_snapshot *, struct dentry *);
608 static inline struct dentry *d_first_child(const struct dentry *dentry) in d_first_child() argument
610 return hlist_entry_safe(dentry->d_children.first, struct dentry, d_sib); in d_first_child()
613 static inline struct dentry *d_next_sibling(const struct dentry *dentry) in d_next_sibling() argument
615 return hlist_entry_safe(dentry->d_sib.next, struct dentry, d_sib); in d_next_sibling()