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 *);
228 extern void d_instantiate(struct dentry *, struct inode *);
229 extern void d_instantiate_new(struct dentry *, struct inode *);
230 extern struct dentry * d_instantiate_unique(struct dentry *, struct inode *);
231 extern struct dentry * d_instantiate_anon(struct dentry *, struct inode *);
232 extern void __d_drop(struct dentry *dentry);
233 extern void d_drop(struct dentry *dentry);
234 extern void d_delete(struct dentry *);
235 extern void d_set_d_op(struct dentry *dentry, const struct dentry_operations *op);
238 extern struct dentry * d_alloc(struct dentry *, const struct qstr *);
239 extern struct dentry * d_alloc_anon(struct super_block *);
240 extern struct dentry * d_alloc_parallel(struct dentry *, const struct qstr *,
242 extern struct dentry * d_splice_alias(struct inode *, struct dentry *);
243 extern struct dentry * d_add_ci(struct dentry *, struct inode *, struct qstr *);
244 extern struct dentry * d_exact_alias(struct dentry *, struct inode *);
245 extern struct dentry *d_find_any_alias(struct inode *inode);
246 extern struct dentry * d_obtain_alias(struct inode *);
247 extern struct dentry * d_obtain_root(struct inode *);
249 extern void shrink_dcache_parent(struct dentry *);
251 extern void d_invalidate(struct dentry *);
254 extern struct dentry * d_make_root(struct inode *);
257 extern void d_genocide(struct dentry *);
259 extern void d_tmpfile(struct dentry *, struct inode *);
261 extern struct dentry *d_find_alias(struct inode *);
270 extern void d_rehash(struct dentry *);
272 extern void d_add(struct dentry *, struct inode *);
275 extern void d_move(struct dentry *, struct dentry *);
276 extern void d_exchange(struct dentry *, struct dentry *);
277 extern struct dentry *d_ancestor(struct dentry *, struct dentry *);
280 extern struct dentry *d_lookup(const struct dentry *, const struct qstr *);
281 extern struct dentry *d_hash_and_lookup(struct dentry *, struct qstr *);
282 extern struct dentry *__d_lookup(const struct dentry *, const struct qstr *);
283 extern struct dentry *__d_lookup_rcu(const struct dentry *parent,
286 static inline unsigned d_count(const struct dentry *dentry) in d_count() argument
288 return dentry->d_lockref.count; in d_count()
295 char *dynamic_dname(struct dentry *, char *, int, const char *, ...);
300 extern char *dentry_path_raw(struct dentry *, char *, int);
301 extern char *dentry_path(struct dentry *, char *, int);
313 static inline struct dentry *dget_dlock(struct dentry *dentry) in dget_dlock() argument
315 if (dentry) in dget_dlock()
316 dentry->d_lockref.count++; in dget_dlock()
317 return dentry; in dget_dlock()
320 static inline struct dentry *dget(struct dentry *dentry) in dget() argument
322 if (dentry) in dget()
323 lockref_get(&dentry->d_lockref); in dget()
324 return dentry; in dget()
327 extern struct dentry *dget_parent(struct dentry *dentry);
336 static inline int d_unhashed(const struct dentry *dentry) in d_unhashed() argument
338 return hlist_bl_unhashed(&dentry->d_hash); in d_unhashed()
341 static inline int d_unlinked(const struct dentry *dentry) in d_unlinked() argument
343 return d_unhashed(dentry) && !IS_ROOT(dentry); in d_unlinked()
346 static inline int cant_mount(const struct dentry *dentry) in cant_mount() argument
348 return (dentry->d_flags & DCACHE_CANT_MOUNT); in cant_mount()
351 static inline void dont_mount(struct dentry *dentry) in dont_mount() argument
353 spin_lock(&dentry->d_lock); in dont_mount()
354 dentry->d_flags |= DCACHE_CANT_MOUNT; in dont_mount()
355 spin_unlock(&dentry->d_lock); in dont_mount()
358 extern void __d_lookup_done(struct dentry *);
360 static inline int d_in_lookup(const struct dentry *dentry) in d_in_lookup() argument
362 return dentry->d_flags & DCACHE_PAR_LOOKUP; in d_in_lookup()
365 static inline void d_lookup_done(struct dentry *dentry) in d_lookup_done() argument
367 if (unlikely(d_in_lookup(dentry))) { in d_lookup_done()
368 spin_lock(&dentry->d_lock); in d_lookup_done()
369 __d_lookup_done(dentry); in d_lookup_done()
370 spin_unlock(&dentry->d_lock); in d_lookup_done()
374 extern void dput(struct dentry *);
376 static inline bool d_managed(const struct dentry *dentry) in d_managed() argument
378 return dentry->d_flags & DCACHE_MANAGED_DENTRY; in d_managed()
381 static inline bool d_mountpoint(const struct dentry *dentry) in d_mountpoint() argument
383 return dentry->d_flags & DCACHE_MOUNTED; in d_mountpoint()
389 static inline unsigned __d_entry_type(const struct dentry *dentry) in __d_entry_type() argument
391 return dentry->d_flags & DCACHE_ENTRY_TYPE; in __d_entry_type()
394 static inline bool d_is_miss(const struct dentry *dentry) in d_is_miss() argument
396 return __d_entry_type(dentry) == DCACHE_MISS_TYPE; in d_is_miss()
399 static inline bool d_is_whiteout(const struct dentry *dentry) in d_is_whiteout() argument
401 return __d_entry_type(dentry) == DCACHE_WHITEOUT_TYPE; in d_is_whiteout()
404 static inline bool d_can_lookup(const struct dentry *dentry) in d_can_lookup() argument
406 return __d_entry_type(dentry) == DCACHE_DIRECTORY_TYPE; in d_can_lookup()
409 static inline bool d_is_autodir(const struct dentry *dentry) in d_is_autodir() argument
411 return __d_entry_type(dentry) == DCACHE_AUTODIR_TYPE; in d_is_autodir()
414 static inline bool d_is_dir(const struct dentry *dentry) in d_is_dir() argument
416 return d_can_lookup(dentry) || d_is_autodir(dentry); in d_is_dir()
419 static inline bool d_is_symlink(const struct dentry *dentry) in d_is_symlink() argument
421 return __d_entry_type(dentry) == DCACHE_SYMLINK_TYPE; in d_is_symlink()
424 static inline bool d_is_reg(const struct dentry *dentry) in d_is_reg() argument
426 return __d_entry_type(dentry) == DCACHE_REGULAR_TYPE; in d_is_reg()
429 static inline bool d_is_special(const struct dentry *dentry) in d_is_special() argument
431 return __d_entry_type(dentry) == DCACHE_SPECIAL_TYPE; in d_is_special()
434 static inline bool d_is_file(const struct dentry *dentry) in d_is_file() argument
436 return d_is_reg(dentry) || d_is_special(dentry); in d_is_file()
439 static inline bool d_is_negative(const struct dentry *dentry) in d_is_negative() argument
442 return d_is_miss(dentry); in d_is_negative()
450 static inline bool d_is_positive(const struct dentry *dentry) in d_is_positive() argument
452 return !d_is_negative(dentry); in d_is_positive()
470 static inline bool d_really_is_negative(const struct dentry *dentry) in d_really_is_negative() argument
472 return dentry->d_inode == NULL; in d_really_is_negative()
488 static inline bool d_really_is_positive(const struct dentry *dentry) in d_really_is_positive() argument
490 return dentry->d_inode != NULL; in d_really_is_positive()
493 static inline int simple_positive(const struct dentry *dentry) in simple_positive() argument
495 return d_really_is_positive(dentry) && !d_unhashed(dentry); in simple_positive()
498 extern void d_set_fallthru(struct dentry *dentry);
500 static inline bool d_is_fallthru(const struct dentry *dentry) in d_is_fallthru() argument
502 return dentry->d_flags & DCACHE_FALLTHRU; in d_is_fallthru()
520 static inline struct inode *d_inode(const struct dentry *dentry) in d_inode() argument
522 return dentry->d_inode; in d_inode()
532 static inline struct inode *d_inode_rcu(const struct dentry *dentry) in d_inode_rcu() argument
534 return READ_ONCE(dentry->d_inode); in d_inode_rcu()
547 static inline struct inode *d_backing_inode(const struct dentry *upper) in d_backing_inode()
564 static inline struct dentry *d_backing_dentry(struct dentry *upper) in d_backing_dentry()
579 static inline struct dentry *d_real(struct dentry *dentry, in d_real() argument
582 if (unlikely(dentry->d_flags & DCACHE_OP_REAL)) in d_real()
583 return dentry->d_op->d_real(dentry, inode); 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_backing_inode(d_real((struct dentry *) dentry, NULL)); in d_real_inode()
605 void take_dentry_name_snapshot(struct name_snapshot *, struct dentry *);