diff options
Diffstat (limited to 'include/linux/dcache.h')
| -rw-r--r-- | include/linux/dcache.h | 16 |
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 | |||
| 189 | extern spinlock_t dcache_lock; | 191 | extern spinlock_t dcache_lock; |
| 190 | extern seqlock_t rename_lock; | 192 | extern seqlock_t rename_lock; |
| 191 | 193 | ||
| @@ -313,6 +315,8 @@ extern char *dynamic_dname(struct dentry *, char *, int, const char *, ...); | |||
| 313 | 315 | ||
| 314 | extern char *__d_path(const struct path *path, struct path *root, char *, int); | 316 | extern char *__d_path(const struct path *path, struct path *root, char *, int); |
| 315 | extern char *d_path(const struct path *, char *, int); | 317 | extern char *d_path(const struct path *, char *, int); |
| 318 | extern char *d_path_with_unreachable(const struct path *, char *, int); | ||
| 319 | extern char *__dentry_path(struct dentry *, char *, int); | ||
| 316 | extern char *dentry_path(struct dentry *, char *, int); | 320 | extern 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 | ||
| 365 | static inline int cant_mount(struct dentry *dentry) | ||
| 366 | { | ||
| 367 | return (dentry->d_flags & DCACHE_CANT_MOUNT); | ||
| 368 | } | ||
| 369 | |||
| 370 | static 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 | |||
| 361 | static inline struct dentry *dget_parent(struct dentry *dentry) | 377 | static inline struct dentry *dget_parent(struct dentry *dentry) |
| 362 | { | 378 | { |
| 363 | struct dentry *ret; | 379 | struct dentry *ret; |
