diff options
Diffstat (limited to 'include/linux/dcache.h')
-rw-r--r-- | include/linux/dcache.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index 15156364d196..30b93b2a01a4 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
@@ -180,10 +180,12 @@ d_iput: no no no yes | |||
180 | #define DCACHE_REFERENCED 0x0008 /* Recently used, don't discard. */ | 180 | #define DCACHE_REFERENCED 0x0008 /* Recently used, don't discard. */ |
181 | #define DCACHE_UNHASHED 0x0010 | 181 | #define DCACHE_UNHASHED 0x0010 |
182 | 182 | ||
183 | #define DCACHE_INOTIFY_PARENT_WATCHED 0x0020 /* Parent inode is watched */ | 183 | #define DCACHE_INOTIFY_PARENT_WATCHED 0x0020 /* Parent inode is watched by inotify */ |
184 | 184 | ||
185 | #define DCACHE_COOKIE 0x0040 /* For use by dcookie subsystem */ | 185 | #define DCACHE_COOKIE 0x0040 /* For use by dcookie subsystem */ |
186 | 186 | ||
187 | #define DCACHE_FSNOTIFY_PARENT_WATCHED 0x0080 /* Parent inode is watched by some fsnotify listener */ | ||
188 | |||
187 | extern spinlock_t dcache_lock; | 189 | extern spinlock_t dcache_lock; |
188 | extern seqlock_t rename_lock; | 190 | extern seqlock_t rename_lock; |
189 | 191 | ||
@@ -351,6 +353,11 @@ static inline int d_unhashed(struct dentry *dentry) | |||
351 | return (dentry->d_flags & DCACHE_UNHASHED); | 353 | return (dentry->d_flags & DCACHE_UNHASHED); |
352 | } | 354 | } |
353 | 355 | ||
356 | static inline int d_unlinked(struct dentry *dentry) | ||
357 | { | ||
358 | return d_unhashed(dentry) && !IS_ROOT(dentry); | ||
359 | } | ||
360 | |||
354 | static inline struct dentry *dget_parent(struct dentry *dentry) | 361 | static inline struct dentry *dget_parent(struct dentry *dentry) |
355 | { | 362 | { |
356 | struct dentry *ret; | 363 | struct dentry *ret; |
@@ -368,7 +375,7 @@ static inline int d_mountpoint(struct dentry *dentry) | |||
368 | return dentry->d_mounted; | 375 | return dentry->d_mounted; |
369 | } | 376 | } |
370 | 377 | ||
371 | extern struct vfsmount *lookup_mnt(struct vfsmount *, struct dentry *); | 378 | extern struct vfsmount *lookup_mnt(struct path *); |
372 | extern struct dentry *lookup_create(struct nameidata *nd, int is_dir); | 379 | extern struct dentry *lookup_create(struct nameidata *nd, int is_dir); |
373 | 380 | ||
374 | extern int sysctl_vfs_cache_pressure; | 381 | extern int sysctl_vfs_cache_pressure; |