aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/dcache.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/dcache.h')
-rw-r--r--include/linux/dcache.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/dcache.h b/include/linux/dcache.h
index 30b93b2a01a4..6a4aea30aa09 100644
--- a/include/linux/dcache.h
+++ b/include/linux/dcache.h
@@ -186,6 +186,8 @@ d_iput: no no no yes
186 186
187#define DCACHE_FSNOTIFY_PARENT_WATCHED 0x0080 /* Parent inode is watched by some fsnotify listener */ 187#define DCACHE_FSNOTIFY_PARENT_WATCHED 0x0080 /* Parent inode is watched by some fsnotify listener */
188 188
189#define DCACHE_CANT_MOUNT 0x0100
190
189extern spinlock_t dcache_lock; 191extern spinlock_t dcache_lock;
190extern seqlock_t rename_lock; 192extern seqlock_t rename_lock;
191 193
@@ -313,6 +315,8 @@ extern char *dynamic_dname(struct dentry *, char *, int, const char *, ...);
313 315
314extern char *__d_path(const struct path *path, struct path *root, char *, int); 316extern char *__d_path(const struct path *path, struct path *root, char *, int);
315extern char *d_path(const struct path *, char *, int); 317extern char *d_path(const struct path *, char *, int);
318extern char *d_path_with_unreachable(const struct path *, char *, int);
319extern char *__dentry_path(struct dentry *, char *, int);
316extern char *dentry_path(struct dentry *, char *, int); 320extern char *dentry_path(struct dentry *, char *, int);
317 321
318/* Allocation counts.. */ 322/* Allocation counts.. */
@@ -358,6 +362,18 @@ static inline int d_unlinked(struct dentry *dentry)
358 return d_unhashed(dentry) && !IS_ROOT(dentry); 362 return d_unhashed(dentry) && !IS_ROOT(dentry);
359} 363}
360 364
365static inline int cant_mount(struct dentry *dentry)
366{
367 return (dentry->d_flags & DCACHE_CANT_MOUNT);
368}
369
370static inline void dont_mount(struct dentry *dentry)
371{
372 spin_lock(&dentry->d_lock);
373 dentry->d_flags |= DCACHE_CANT_MOUNT;
374 spin_unlock(&dentry->d_lock);
375}
376
361static inline struct dentry *dget_parent(struct dentry *dentry) 377static inline struct dentry *dget_parent(struct dentry *dentry)
362{ 378{
363 struct dentry *ret; 379 struct dentry *ret;