Lines Matching refs:dentry
90 struct dentry { struct
95 struct dentry *d_parent; /* parent directory */ argument
140 int (*d_revalidate)(struct dentry *, unsigned int);
141 int (*d_weak_revalidate)(struct dentry *, unsigned int);
142 int (*d_hash)(const struct dentry *, struct qstr *);
143 int (*d_compare)(const struct dentry *,
145 int (*d_delete)(const struct dentry *);
146 int (*d_init)(struct dentry *);
147 void (*d_release)(struct dentry *);
148 void (*d_prune)(struct dentry *);
149 void (*d_iput)(struct dentry *, struct inode *);
150 char *(*d_dname)(struct dentry *, char *, int);
153 struct dentry *(*d_real)(struct dentry *, const struct inode *);
237 extern void d_instantiate(struct dentry *, struct inode *);
238 extern void d_instantiate_new(struct dentry *, struct inode *);
239 extern struct dentry * d_instantiate_unique(struct dentry *, struct inode *);
240 extern struct dentry * d_instantiate_anon(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 struct dentry * d_exact_alias(struct dentry *, struct inode *);
254 extern struct dentry *d_find_any_alias(struct inode *inode);
255 extern struct dentry * d_obtain_alias(struct inode *);
256 extern struct dentry * d_obtain_root(struct inode *);
258 extern void shrink_dcache_parent(struct dentry *);
260 extern void d_invalidate(struct dentry *);
263 extern struct dentry * d_make_root(struct inode *);
266 extern void d_genocide(struct dentry *);
268 extern void d_tmpfile(struct dentry *, struct inode *);
270 extern struct dentry *d_find_alias(struct inode *);
279 extern void d_rehash(struct dentry *);
281 extern void d_add(struct dentry *, struct inode *);
284 extern void d_move(struct dentry *, struct dentry *);
285 extern void d_exchange(struct dentry *, struct dentry *);
286 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 *);
291 extern struct dentry *__d_lookup(const struct dentry *, const struct qstr *);
292 extern struct dentry *__d_lookup_rcu(const struct dentry *parent,
295 static inline unsigned d_count(const struct dentry *dentry) in d_count() argument
297 return dentry->d_lockref.count; in d_count()
304 char *dynamic_dname(struct dentry *, char *, int, const char *, ...);
309 extern char *dentry_path_raw(struct dentry *, char *, int);
310 extern char *dentry_path(struct dentry *, char *, int);
322 static inline struct dentry *dget_dlock(struct dentry *dentry) in dget_dlock() argument
324 if (dentry) in dget_dlock()
325 dentry->d_lockref.count++; in dget_dlock()
326 return dentry; in dget_dlock()
329 static inline struct dentry *dget(struct dentry *dentry) in dget() argument
331 if (dentry) in dget()
332 lockref_get(&dentry->d_lockref); in dget()
333 return dentry; in dget()
336 extern struct dentry *dget_parent(struct dentry *dentry);
345 static inline int d_unhashed(const struct dentry *dentry) in d_unhashed() argument
347 return hlist_bl_unhashed(&dentry->d_hash); in d_unhashed()
350 static inline int d_unlinked(const struct dentry *dentry) in d_unlinked() argument
352 return d_unhashed(dentry) && !IS_ROOT(dentry); in d_unlinked()
355 static inline int cant_mount(const struct dentry *dentry) in cant_mount() argument
357 return (dentry->d_flags & DCACHE_CANT_MOUNT); in cant_mount()
360 static inline void dont_mount(struct dentry *dentry) in dont_mount() argument
362 spin_lock(&dentry->d_lock); in dont_mount()
363 dentry->d_flags |= DCACHE_CANT_MOUNT; in dont_mount()
364 spin_unlock(&dentry->d_lock); in dont_mount()
367 extern void __d_lookup_done(struct dentry *);
369 static inline int d_in_lookup(const struct dentry *dentry) in d_in_lookup() argument
371 return dentry->d_flags & DCACHE_PAR_LOOKUP; in d_in_lookup()
374 static inline void d_lookup_done(struct dentry *dentry) in d_lookup_done() argument
376 if (unlikely(d_in_lookup(dentry))) { in d_lookup_done()
377 spin_lock(&dentry->d_lock); in d_lookup_done()
378 __d_lookup_done(dentry); in d_lookup_done()
379 spin_unlock(&dentry->d_lock); in d_lookup_done()
383 extern void dput(struct dentry *);
385 static inline bool d_managed(const struct dentry *dentry) in d_managed() argument
387 return dentry->d_flags & DCACHE_MANAGED_DENTRY; in d_managed()
390 static inline bool d_mountpoint(const struct dentry *dentry) in d_mountpoint() argument
392 return dentry->d_flags & DCACHE_MOUNTED; in d_mountpoint()
398 static inline unsigned __d_entry_type(const struct dentry *dentry) in __d_entry_type() argument
400 return dentry->d_flags & DCACHE_ENTRY_TYPE; in __d_entry_type()
403 static inline bool d_is_miss(const struct dentry *dentry) in d_is_miss() argument
405 return __d_entry_type(dentry) == DCACHE_MISS_TYPE; in d_is_miss()
408 static inline bool d_is_whiteout(const struct dentry *dentry) in d_is_whiteout() argument
410 return __d_entry_type(dentry) == DCACHE_WHITEOUT_TYPE; in d_is_whiteout()
413 static inline bool d_can_lookup(const struct dentry *dentry) in d_can_lookup() argument
415 return __d_entry_type(dentry) == DCACHE_DIRECTORY_TYPE; in d_can_lookup()
418 static inline bool d_is_autodir(const struct dentry *dentry) in d_is_autodir() argument
420 return __d_entry_type(dentry) == DCACHE_AUTODIR_TYPE; in d_is_autodir()
423 static inline bool d_is_dir(const struct dentry *dentry) in d_is_dir() argument
425 return d_can_lookup(dentry) || d_is_autodir(dentry); in d_is_dir()
428 static inline bool d_is_symlink(const struct dentry *dentry) in d_is_symlink() argument
430 return __d_entry_type(dentry) == DCACHE_SYMLINK_TYPE; in d_is_symlink()
433 static inline bool d_is_reg(const struct dentry *dentry) in d_is_reg() argument
435 return __d_entry_type(dentry) == DCACHE_REGULAR_TYPE; in d_is_reg()
438 static inline bool d_is_special(const struct dentry *dentry) in d_is_special() argument
440 return __d_entry_type(dentry) == DCACHE_SPECIAL_TYPE; in d_is_special()
443 static inline bool d_is_file(const struct dentry *dentry) in d_is_file() argument
445 return d_is_reg(dentry) || d_is_special(dentry); in d_is_file()
448 static inline bool d_is_negative(const struct dentry *dentry) in d_is_negative() argument
451 return d_is_miss(dentry); in d_is_negative()
459 static inline bool d_is_positive(const struct dentry *dentry) in d_is_positive() argument
461 return !d_is_negative(dentry); in d_is_positive()
479 static inline bool d_really_is_negative(const struct dentry *dentry) in d_really_is_negative() argument
481 return dentry->d_inode == NULL; in d_really_is_negative()
497 static inline bool d_really_is_positive(const struct dentry *dentry) in d_really_is_positive() argument
499 return dentry->d_inode != NULL; in d_really_is_positive()
502 static inline int simple_positive(const struct dentry *dentry) in simple_positive() argument
504 return d_really_is_positive(dentry) && !d_unhashed(dentry); in simple_positive()
507 extern void d_set_fallthru(struct dentry *dentry);
509 static inline bool d_is_fallthru(const struct dentry *dentry) in d_is_fallthru() argument
511 return dentry->d_flags & DCACHE_FALLTHRU; in d_is_fallthru()
529 static inline struct inode *d_inode(const struct dentry *dentry) in d_inode() argument
531 return dentry->d_inode; in d_inode()
541 static inline struct inode *d_inode_rcu(const struct dentry *dentry) in d_inode_rcu() argument
543 return READ_ONCE(dentry->d_inode); in d_inode_rcu()
556 static inline struct inode *d_backing_inode(const struct dentry *upper) in d_backing_inode()
573 static inline struct dentry *d_backing_dentry(struct dentry *upper) in d_backing_dentry()
588 static inline struct dentry *d_real(struct dentry *dentry, in d_real() argument
591 if (unlikely(dentry->d_flags & DCACHE_OP_REAL)) in d_real()
592 return dentry->d_op->d_real(dentry, inode); in d_real()
594 return dentry; in d_real()
604 static inline struct inode *d_real_inode(const struct dentry *dentry) in d_real_inode() argument
607 return d_backing_inode(d_real((struct dentry *) dentry, NULL)); in d_real_inode()
614 void take_dentry_name_snapshot(struct name_snapshot *, struct dentry *);