Lines Matching refs:dentry

91 struct dentry {  struct
96 struct dentry *d_parent; /* parent directory */ argument
138 int (*d_revalidate)(struct dentry *, unsigned int);
139 int (*d_weak_revalidate)(struct dentry *, unsigned int);
140 int (*d_hash)(const struct dentry *, struct qstr *);
141 int (*d_compare)(const struct dentry *,
143 int (*d_delete)(const struct dentry *);
144 int (*d_init)(struct dentry *);
145 void (*d_release)(struct dentry *);
146 void (*d_prune)(struct dentry *);
147 void (*d_iput)(struct dentry *, struct inode *);
148 char *(*d_dname)(struct dentry *, char *, int);
151 struct dentry *(*d_real)(struct dentry *, const struct inode *);
230 extern void d_instantiate(struct dentry *, struct inode *);
231 extern void d_instantiate_new(struct dentry *, struct inode *);
232 extern struct dentry * d_instantiate_unique(struct dentry *, struct inode *);
233 extern struct dentry * d_instantiate_anon(struct dentry *, struct inode *);
234 extern void __d_drop(struct dentry *dentry);
235 extern void d_drop(struct dentry *dentry);
236 extern void d_delete(struct dentry *);
237 extern void d_set_d_op(struct dentry *dentry, const struct dentry_operations *op);
240 extern struct dentry * d_alloc(struct dentry *, const struct qstr *);
241 extern struct dentry * d_alloc_anon(struct super_block *);
242 extern struct dentry * d_alloc_parallel(struct dentry *, const struct qstr *,
244 extern struct dentry * d_splice_alias(struct inode *, struct dentry *);
245 extern struct dentry * d_add_ci(struct dentry *, struct inode *, struct qstr *);
246 extern struct dentry * d_exact_alias(struct dentry *, struct inode *);
247 extern struct dentry *d_find_any_alias(struct inode *inode);
248 extern struct dentry * d_obtain_alias(struct inode *);
249 extern struct dentry * d_obtain_root(struct inode *);
251 extern void shrink_dcache_parent(struct dentry *);
253 extern void d_invalidate(struct dentry *);
256 extern struct dentry * d_make_root(struct inode *);
259 extern void d_genocide(struct dentry *);
261 extern void d_tmpfile(struct dentry *, 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 *);
284 extern struct dentry *d_lookup(const struct dentry *, const struct qstr *);
285 extern struct dentry *d_hash_and_lookup(struct dentry *, struct qstr *);
286 extern struct dentry *__d_lookup(const struct dentry *, const struct qstr *);
287 extern struct dentry *__d_lookup_rcu(const struct dentry *parent,
290 static inline unsigned d_count(const struct dentry *dentry) in d_count() argument
292 return dentry->d_lockref.count; in d_count()
299 char *dynamic_dname(struct dentry *, char *, int, const char *, ...);
304 extern char *dentry_path_raw(const struct dentry *, char *, int);
305 extern char *dentry_path(const struct dentry *, char *, int);
317 static inline struct dentry *dget_dlock(struct dentry *dentry) in dget_dlock() argument
319 if (dentry) in dget_dlock()
320 dentry->d_lockref.count++; in dget_dlock()
321 return dentry; in dget_dlock()
324 static inline struct dentry *dget(struct dentry *dentry) in dget() argument
326 if (dentry) in dget()
327 lockref_get(&dentry->d_lockref); in dget()
328 return dentry; in dget()
331 extern struct dentry *dget_parent(struct dentry *dentry);
340 static inline int d_unhashed(const struct dentry *dentry) in d_unhashed() argument
342 return hlist_bl_unhashed(&dentry->d_hash); in d_unhashed()
345 static inline int d_unlinked(const struct dentry *dentry) in d_unlinked() argument
347 return d_unhashed(dentry) && !IS_ROOT(dentry); in d_unlinked()
350 static inline int cant_mount(const struct dentry *dentry) in cant_mount() argument
352 return (dentry->d_flags & DCACHE_CANT_MOUNT); in cant_mount()
355 static inline void dont_mount(struct dentry *dentry) in dont_mount() argument
357 spin_lock(&dentry->d_lock); in dont_mount()
358 dentry->d_flags |= DCACHE_CANT_MOUNT; in dont_mount()
359 spin_unlock(&dentry->d_lock); in dont_mount()
362 extern void __d_lookup_done(struct dentry *);
364 static inline int d_in_lookup(const struct dentry *dentry) in d_in_lookup() argument
366 return dentry->d_flags & DCACHE_PAR_LOOKUP; in d_in_lookup()
369 static inline void d_lookup_done(struct dentry *dentry) in d_lookup_done() argument
371 if (unlikely(d_in_lookup(dentry))) { in d_lookup_done()
372 spin_lock(&dentry->d_lock); in d_lookup_done()
373 __d_lookup_done(dentry); in d_lookup_done()
374 spin_unlock(&dentry->d_lock); in d_lookup_done()
378 extern void dput(struct dentry *);
380 static inline bool d_managed(const struct dentry *dentry) in d_managed() argument
382 return dentry->d_flags & DCACHE_MANAGED_DENTRY; in d_managed()
385 static inline bool d_mountpoint(const struct dentry *dentry) in d_mountpoint() argument
387 return dentry->d_flags & DCACHE_MOUNTED; in d_mountpoint()
393 static inline unsigned __d_entry_type(const struct dentry *dentry) in __d_entry_type() argument
395 return dentry->d_flags & DCACHE_ENTRY_TYPE; in __d_entry_type()
398 static inline bool d_is_miss(const struct dentry *dentry) in d_is_miss() argument
400 return __d_entry_type(dentry) == DCACHE_MISS_TYPE; in d_is_miss()
403 static inline bool d_is_whiteout(const struct dentry *dentry) in d_is_whiteout() argument
405 return __d_entry_type(dentry) == DCACHE_WHITEOUT_TYPE; in d_is_whiteout()
408 static inline bool d_can_lookup(const struct dentry *dentry) in d_can_lookup() argument
410 return __d_entry_type(dentry) == DCACHE_DIRECTORY_TYPE; in d_can_lookup()
413 static inline bool d_is_autodir(const struct dentry *dentry) in d_is_autodir() argument
415 return __d_entry_type(dentry) == DCACHE_AUTODIR_TYPE; in d_is_autodir()
418 static inline bool d_is_dir(const struct dentry *dentry) in d_is_dir() argument
420 return d_can_lookup(dentry) || d_is_autodir(dentry); in d_is_dir()
423 static inline bool d_is_symlink(const struct dentry *dentry) in d_is_symlink() argument
425 return __d_entry_type(dentry) == DCACHE_SYMLINK_TYPE; in d_is_symlink()
428 static inline bool d_is_reg(const struct dentry *dentry) in d_is_reg() argument
430 return __d_entry_type(dentry) == DCACHE_REGULAR_TYPE; in d_is_reg()
433 static inline bool d_is_special(const struct dentry *dentry) in d_is_special() argument
435 return __d_entry_type(dentry) == DCACHE_SPECIAL_TYPE; in d_is_special()
438 static inline bool d_is_file(const struct dentry *dentry) in d_is_file() argument
440 return d_is_reg(dentry) || d_is_special(dentry); in d_is_file()
443 static inline bool d_is_negative(const struct dentry *dentry) in d_is_negative() argument
446 return d_is_miss(dentry); in d_is_negative()
454 static inline bool d_is_positive(const struct dentry *dentry) in d_is_positive() argument
456 return !d_is_negative(dentry); in d_is_positive()
474 static inline bool d_really_is_negative(const struct dentry *dentry) in d_really_is_negative() argument
476 return dentry->d_inode == NULL; in d_really_is_negative()
492 static inline bool d_really_is_positive(const struct dentry *dentry) in d_really_is_positive() argument
494 return dentry->d_inode != NULL; in d_really_is_positive()
497 static inline int simple_positive(const struct dentry *dentry) in simple_positive() argument
499 return d_really_is_positive(dentry) && !d_unhashed(dentry); in simple_positive()
502 extern void d_set_fallthru(struct dentry *dentry);
504 static inline bool d_is_fallthru(const struct dentry *dentry) in d_is_fallthru() argument
506 return dentry->d_flags & DCACHE_FALLTHRU; in d_is_fallthru()
524 static inline struct inode *d_inode(const struct dentry *dentry) in d_inode() argument
526 return dentry->d_inode; in d_inode()
536 static inline struct inode *d_inode_rcu(const struct dentry *dentry) in d_inode_rcu() argument
538 return READ_ONCE(dentry->d_inode); in d_inode_rcu()
551 static inline struct inode *d_backing_inode(const struct dentry *upper) in d_backing_inode()
568 static inline struct dentry *d_backing_dentry(struct dentry *upper) in d_backing_dentry()
583 static inline struct dentry *d_real(struct dentry *dentry, in d_real() argument
586 if (unlikely(dentry->d_flags & DCACHE_OP_REAL)) in d_real()
587 return dentry->d_op->d_real(dentry, inode); in d_real()
589 return dentry; in d_real()
599 static inline struct inode *d_real_inode(const struct dentry *dentry) in d_real_inode() argument
602 return d_backing_inode(d_real((struct dentry *) dentry, NULL)); in d_real_inode()
609 void take_dentry_name_snapshot(struct name_snapshot *, struct dentry *);