Lines Matching refs:dentry
89 struct dentry { struct
94 struct dentry *d_parent; /* parent directory */ argument
136 int (*d_revalidate)(struct dentry *, unsigned int);
137 int (*d_weak_revalidate)(struct dentry *, unsigned int);
138 int (*d_hash)(const struct dentry *, struct qstr *);
139 int (*d_compare)(const struct dentry *,
141 int (*d_delete)(const struct dentry *);
142 int (*d_init)(struct dentry *);
143 void (*d_release)(struct dentry *);
144 void (*d_prune)(struct dentry *);
145 void (*d_iput)(struct dentry *, struct inode *);
146 char *(*d_dname)(struct dentry *, char *, int);
149 struct dentry *(*d_real)(struct dentry *, const struct inode *);
226 extern void d_instantiate(struct dentry *, struct inode *);
227 extern void d_instantiate_new(struct dentry *, struct inode *);
228 extern struct dentry * d_instantiate_unique(struct dentry *, struct inode *);
229 extern struct dentry * d_instantiate_anon(struct dentry *, struct inode *);
230 extern void __d_drop(struct dentry *dentry);
231 extern void d_drop(struct dentry *dentry);
232 extern void d_delete(struct dentry *);
233 extern void d_set_d_op(struct dentry *dentry, const struct dentry_operations *op);
236 extern struct dentry * d_alloc(struct dentry *, const struct qstr *);
237 extern struct dentry * d_alloc_anon(struct super_block *);
238 extern struct dentry * d_alloc_parallel(struct dentry *, const struct qstr *,
240 extern struct dentry * d_splice_alias(struct inode *, struct dentry *);
241 extern struct dentry * d_add_ci(struct dentry *, struct inode *, struct qstr *);
242 extern struct dentry * d_exact_alias(struct dentry *, struct inode *);
243 extern struct dentry *d_find_any_alias(struct inode *inode);
244 extern struct dentry * d_obtain_alias(struct inode *);
245 extern struct dentry * d_obtain_root(struct inode *);
247 extern void shrink_dcache_parent(struct dentry *);
249 extern void d_invalidate(struct dentry *);
252 extern struct dentry * d_make_root(struct inode *);
255 extern void d_genocide(struct dentry *);
257 extern void d_tmpfile(struct dentry *, struct inode *);
259 extern struct dentry *d_find_alias(struct inode *);
268 extern void d_rehash(struct dentry *);
270 extern void d_add(struct dentry *, struct inode *);
273 extern void d_move(struct dentry *, struct dentry *);
274 extern void d_exchange(struct dentry *, struct dentry *);
275 extern struct dentry *d_ancestor(struct dentry *, struct dentry *);
278 extern struct dentry *d_lookup(const struct dentry *, const struct qstr *);
279 extern struct dentry *d_hash_and_lookup(struct dentry *, struct qstr *);
280 extern struct dentry *__d_lookup(const struct dentry *, const struct qstr *);
281 extern struct dentry *__d_lookup_rcu(const struct dentry *parent,
284 static inline unsigned d_count(const struct dentry *dentry) in d_count() argument
286 return dentry->d_lockref.count; in d_count()
293 char *dynamic_dname(struct dentry *, char *, int, const char *, ...);
298 extern char *dentry_path_raw(struct dentry *, char *, int);
299 extern char *dentry_path(struct dentry *, char *, int);
311 static inline struct dentry *dget_dlock(struct dentry *dentry) in dget_dlock() argument
313 if (dentry) in dget_dlock()
314 dentry->d_lockref.count++; in dget_dlock()
315 return dentry; in dget_dlock()
318 static inline struct dentry *dget(struct dentry *dentry) in dget() argument
320 if (dentry) in dget()
321 lockref_get(&dentry->d_lockref); in dget()
322 return dentry; in dget()
325 extern struct dentry *dget_parent(struct dentry *dentry);
334 static inline int d_unhashed(const struct dentry *dentry) in d_unhashed() argument
336 return hlist_bl_unhashed(&dentry->d_hash); in d_unhashed()
339 static inline int d_unlinked(const struct dentry *dentry) in d_unlinked() argument
341 return d_unhashed(dentry) && !IS_ROOT(dentry); in d_unlinked()
344 static inline int cant_mount(const struct dentry *dentry) in cant_mount() argument
346 return (dentry->d_flags & DCACHE_CANT_MOUNT); in cant_mount()
349 static inline void dont_mount(struct dentry *dentry) in dont_mount() argument
351 spin_lock(&dentry->d_lock); in dont_mount()
352 dentry->d_flags |= DCACHE_CANT_MOUNT; in dont_mount()
353 spin_unlock(&dentry->d_lock); in dont_mount()
356 extern void __d_lookup_done(struct dentry *);
358 static inline int d_in_lookup(const struct dentry *dentry) in d_in_lookup() argument
360 return dentry->d_flags & DCACHE_PAR_LOOKUP; in d_in_lookup()
363 static inline void d_lookup_done(struct dentry *dentry) in d_lookup_done() argument
365 if (unlikely(d_in_lookup(dentry))) { in d_lookup_done()
366 spin_lock(&dentry->d_lock); in d_lookup_done()
367 __d_lookup_done(dentry); in d_lookup_done()
368 spin_unlock(&dentry->d_lock); in d_lookup_done()
372 extern void dput(struct dentry *);
374 static inline bool d_managed(const struct dentry *dentry) in d_managed() argument
376 return dentry->d_flags & DCACHE_MANAGED_DENTRY; in d_managed()
379 static inline bool d_mountpoint(const struct dentry *dentry) in d_mountpoint() argument
381 return dentry->d_flags & DCACHE_MOUNTED; in d_mountpoint()
387 static inline unsigned __d_entry_type(const struct dentry *dentry) in __d_entry_type() argument
389 return dentry->d_flags & DCACHE_ENTRY_TYPE; in __d_entry_type()
392 static inline bool d_is_miss(const struct dentry *dentry) in d_is_miss() argument
394 return __d_entry_type(dentry) == DCACHE_MISS_TYPE; in d_is_miss()
397 static inline bool d_is_whiteout(const struct dentry *dentry) in d_is_whiteout() argument
399 return __d_entry_type(dentry) == DCACHE_WHITEOUT_TYPE; in d_is_whiteout()
402 static inline bool d_can_lookup(const struct dentry *dentry) in d_can_lookup() argument
404 return __d_entry_type(dentry) == DCACHE_DIRECTORY_TYPE; in d_can_lookup()
407 static inline bool d_is_autodir(const struct dentry *dentry) in d_is_autodir() argument
409 return __d_entry_type(dentry) == DCACHE_AUTODIR_TYPE; in d_is_autodir()
412 static inline bool d_is_dir(const struct dentry *dentry) in d_is_dir() argument
414 return d_can_lookup(dentry) || d_is_autodir(dentry); in d_is_dir()
417 static inline bool d_is_symlink(const struct dentry *dentry) in d_is_symlink() argument
419 return __d_entry_type(dentry) == DCACHE_SYMLINK_TYPE; in d_is_symlink()
422 static inline bool d_is_reg(const struct dentry *dentry) in d_is_reg() argument
424 return __d_entry_type(dentry) == DCACHE_REGULAR_TYPE; in d_is_reg()
427 static inline bool d_is_special(const struct dentry *dentry) in d_is_special() argument
429 return __d_entry_type(dentry) == DCACHE_SPECIAL_TYPE; in d_is_special()
432 static inline bool d_is_file(const struct dentry *dentry) in d_is_file() argument
434 return d_is_reg(dentry) || d_is_special(dentry); in d_is_file()
437 static inline bool d_is_negative(const struct dentry *dentry) in d_is_negative() argument
440 return d_is_miss(dentry); in d_is_negative()
443 static inline bool d_is_positive(const struct dentry *dentry) in d_is_positive() argument
445 return !d_is_negative(dentry); in d_is_positive()
463 static inline bool d_really_is_negative(const struct dentry *dentry) in d_really_is_negative() argument
465 return dentry->d_inode == NULL; in d_really_is_negative()
481 static inline bool d_really_is_positive(const struct dentry *dentry) in d_really_is_positive() argument
483 return dentry->d_inode != NULL; in d_really_is_positive()
486 static inline int simple_positive(const struct dentry *dentry) in simple_positive() argument
488 return d_really_is_positive(dentry) && !d_unhashed(dentry); in simple_positive()
491 extern void d_set_fallthru(struct dentry *dentry);
493 static inline bool d_is_fallthru(const struct dentry *dentry) in d_is_fallthru() argument
495 return dentry->d_flags & DCACHE_FALLTHRU; in d_is_fallthru()
513 static inline struct inode *d_inode(const struct dentry *dentry) in d_inode() argument
515 return dentry->d_inode; in d_inode()
525 static inline struct inode *d_inode_rcu(const struct dentry *dentry) in d_inode_rcu() argument
527 return READ_ONCE(dentry->d_inode); in d_inode_rcu()
540 static inline struct inode *d_backing_inode(const struct dentry *upper) in d_backing_inode()
557 static inline struct dentry *d_backing_dentry(struct dentry *upper) in d_backing_dentry()
572 static inline struct dentry *d_real(struct dentry *dentry, in d_real() argument
575 if (unlikely(dentry->d_flags & DCACHE_OP_REAL)) in d_real()
576 return dentry->d_op->d_real(dentry, inode); in d_real()
578 return dentry; in d_real()
588 static inline struct inode *d_real_inode(const struct dentry *dentry) in d_real_inode() argument
591 return d_backing_inode(d_real((struct dentry *) dentry, NULL)); in d_real_inode()
598 void take_dentry_name_snapshot(struct name_snapshot *, struct dentry *);