diff options
Diffstat (limited to 'include/linux/dcache.h')
-rw-r--r-- | include/linux/dcache.h | 43 |
1 files changed, 23 insertions, 20 deletions
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index 19d90a55541..713c7c62443 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
@@ -1,7 +1,7 @@ | |||
1 | #ifndef __LINUX_DCACHE_H | 1 | #ifndef __LINUX_DCACHE_H |
2 | #define __LINUX_DCACHE_H | 2 | #define __LINUX_DCACHE_H |
3 | 3 | ||
4 | #include <asm/atomic.h> | 4 | #include <linux/atomic.h> |
5 | #include <linux/list.h> | 5 | #include <linux/list.h> |
6 | #include <linux/rculist.h> | 6 | #include <linux/rculist.h> |
7 | #include <linux/rculist_bl.h> | 7 | #include <linux/rculist_bl.h> |
@@ -180,12 +180,12 @@ struct dentry_operations { | |||
180 | */ | 180 | */ |
181 | 181 | ||
182 | /* d_flags entries */ | 182 | /* d_flags entries */ |
183 | #define DCACHE_AUTOFS_PENDING 0x0001 /* autofs: "under construction" */ | 183 | #define DCACHE_OP_HASH 0x0001 |
184 | #define DCACHE_NFSFS_RENAMED 0x0002 | 184 | #define DCACHE_OP_COMPARE 0x0002 |
185 | /* this dentry has been "silly renamed" and has to be deleted on the last | 185 | #define DCACHE_OP_REVALIDATE 0x0004 |
186 | * dput() */ | 186 | #define DCACHE_OP_DELETE 0x0008 |
187 | 187 | ||
188 | #define DCACHE_DISCONNECTED 0x0004 | 188 | #define DCACHE_DISCONNECTED 0x0010 |
189 | /* This dentry is possibly not currently connected to the dcache tree, in | 189 | /* This dentry is possibly not currently connected to the dcache tree, in |
190 | * which case its parent will either be itself, or will have this flag as | 190 | * which case its parent will either be itself, or will have this flag as |
191 | * well. nfsd will not use a dentry with this bit set, but will first | 191 | * well. nfsd will not use a dentry with this bit set, but will first |
@@ -196,26 +196,23 @@ struct dentry_operations { | |||
196 | * dentry into place and return that dentry rather than the passed one, | 196 | * dentry into place and return that dentry rather than the passed one, |
197 | * typically using d_splice_alias. */ | 197 | * typically using d_splice_alias. */ |
198 | 198 | ||
199 | #define DCACHE_REFERENCED 0x0008 /* Recently used, don't discard. */ | 199 | #define DCACHE_REFERENCED 0x0020 /* Recently used, don't discard. */ |
200 | #define DCACHE_RCUACCESS 0x0010 /* Entry has ever been RCU-visible */ | 200 | #define DCACHE_RCUACCESS 0x0040 /* Entry has ever been RCU-visible */ |
201 | #define DCACHE_INOTIFY_PARENT_WATCHED 0x0020 | ||
202 | /* Parent inode is watched by inotify */ | ||
203 | |||
204 | #define DCACHE_COOKIE 0x0040 /* For use by dcookie subsystem */ | ||
205 | #define DCACHE_FSNOTIFY_PARENT_WATCHED 0x0080 | ||
206 | /* Parent inode is watched by some fsnotify listener */ | ||
207 | 201 | ||
208 | #define DCACHE_CANT_MOUNT 0x0100 | 202 | #define DCACHE_CANT_MOUNT 0x0100 |
209 | #define DCACHE_GENOCIDE 0x0200 | 203 | #define DCACHE_GENOCIDE 0x0200 |
210 | 204 | ||
211 | #define DCACHE_OP_HASH 0x1000 | 205 | #define DCACHE_NFSFS_RENAMED 0x1000 |
212 | #define DCACHE_OP_COMPARE 0x2000 | 206 | /* this dentry has been "silly renamed" and has to be deleted on the last |
213 | #define DCACHE_OP_REVALIDATE 0x4000 | 207 | * dput() */ |
214 | #define DCACHE_OP_DELETE 0x8000 | 208 | #define DCACHE_COOKIE 0x2000 /* For use by dcookie subsystem */ |
209 | #define DCACHE_FSNOTIFY_PARENT_WATCHED 0x4000 | ||
210 | /* Parent inode is watched by some fsnotify listener */ | ||
215 | 211 | ||
216 | #define DCACHE_MOUNTED 0x10000 /* is a mountpoint */ | 212 | #define DCACHE_MOUNTED 0x10000 /* is a mountpoint */ |
217 | #define DCACHE_NEED_AUTOMOUNT 0x20000 /* handle automount on this dir */ | 213 | #define DCACHE_NEED_AUTOMOUNT 0x20000 /* handle automount on this dir */ |
218 | #define DCACHE_MANAGE_TRANSIT 0x40000 /* manage transit from this dirent */ | 214 | #define DCACHE_MANAGE_TRANSIT 0x40000 /* manage transit from this dirent */ |
215 | #define DCACHE_NEED_LOOKUP 0x80000 /* dentry requires i_op->lookup */ | ||
219 | #define DCACHE_MANAGED_DENTRY \ | 216 | #define DCACHE_MANAGED_DENTRY \ |
220 | (DCACHE_MOUNTED|DCACHE_NEED_AUTOMOUNT|DCACHE_MANAGE_TRANSIT) | 217 | (DCACHE_MOUNTED|DCACHE_NEED_AUTOMOUNT|DCACHE_MANAGE_TRANSIT) |
221 | 218 | ||
@@ -340,7 +337,8 @@ extern int d_validate(struct dentry *, struct dentry *); | |||
340 | */ | 337 | */ |
341 | extern char *dynamic_dname(struct dentry *, char *, int, const char *, ...); | 338 | extern char *dynamic_dname(struct dentry *, char *, int, const char *, ...); |
342 | 339 | ||
343 | extern char *__d_path(const struct path *path, struct path *root, char *, int); | 340 | extern char *__d_path(const struct path *, const struct path *, char *, int); |
341 | extern char *d_absolute_path(const struct path *, char *, int); | ||
344 | extern char *d_path(const struct path *, char *, int); | 342 | extern char *d_path(const struct path *, char *, int); |
345 | extern char *d_path_with_unreachable(const struct path *, char *, int); | 343 | extern char *d_path_with_unreachable(const struct path *, char *, int); |
346 | extern char *dentry_path_raw(struct dentry *, char *, int); | 344 | extern char *dentry_path_raw(struct dentry *, char *, int); |
@@ -416,7 +414,12 @@ static inline bool d_mountpoint(struct dentry *dentry) | |||
416 | return dentry->d_flags & DCACHE_MOUNTED; | 414 | return dentry->d_flags & DCACHE_MOUNTED; |
417 | } | 415 | } |
418 | 416 | ||
419 | extern struct dentry *lookup_create(struct nameidata *nd, int is_dir); | 417 | static inline bool d_need_lookup(struct dentry *dentry) |
418 | { | ||
419 | return dentry->d_flags & DCACHE_NEED_LOOKUP; | ||
420 | } | ||
421 | |||
422 | extern void d_clear_need_lookup(struct dentry *dentry); | ||
420 | 423 | ||
421 | extern int sysctl_vfs_cache_pressure; | 424 | extern int sysctl_vfs_cache_pressure; |
422 | 425 | ||