diff options
Diffstat (limited to 'include/linux/dcache.h')
-rw-r--r-- | include/linux/dcache.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index bf72e9ac6de0..3c7ec327ebd2 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
@@ -221,6 +221,8 @@ struct dentry_operations { | |||
221 | #define DCACHE_SYMLINK_TYPE 0x00300000 /* Symlink */ | 221 | #define DCACHE_SYMLINK_TYPE 0x00300000 /* Symlink */ |
222 | #define DCACHE_FILE_TYPE 0x00400000 /* Other file type */ | 222 | #define DCACHE_FILE_TYPE 0x00400000 /* Other file type */ |
223 | 223 | ||
224 | #define DCACHE_MAY_FREE 0x00800000 | ||
225 | |||
224 | extern seqlock_t rename_lock; | 226 | extern seqlock_t rename_lock; |
225 | 227 | ||
226 | static inline int dname_external(const struct dentry *dentry) | 228 | static inline int dname_external(const struct dentry *dentry) |
@@ -308,6 +310,7 @@ extern void dentry_update_name_case(struct dentry *, struct qstr *); | |||
308 | 310 | ||
309 | /* used for rename() and baskets */ | 311 | /* used for rename() and baskets */ |
310 | extern void d_move(struct dentry *, struct dentry *); | 312 | extern void d_move(struct dentry *, struct dentry *); |
313 | extern void d_exchange(struct dentry *, struct dentry *); | ||
311 | extern struct dentry *d_ancestor(struct dentry *, struct dentry *); | 314 | extern struct dentry *d_ancestor(struct dentry *, struct dentry *); |
312 | 315 | ||
313 | /* appendix may either be NULL or be used for transname suffixes */ | 316 | /* appendix may either be NULL or be used for transname suffixes */ |
@@ -429,7 +432,7 @@ static inline unsigned __d_entry_type(const struct dentry *dentry) | |||
429 | return dentry->d_flags & DCACHE_ENTRY_TYPE; | 432 | return dentry->d_flags & DCACHE_ENTRY_TYPE; |
430 | } | 433 | } |
431 | 434 | ||
432 | static inline bool d_is_directory(const struct dentry *dentry) | 435 | static inline bool d_can_lookup(const struct dentry *dentry) |
433 | { | 436 | { |
434 | return __d_entry_type(dentry) == DCACHE_DIRECTORY_TYPE; | 437 | return __d_entry_type(dentry) == DCACHE_DIRECTORY_TYPE; |
435 | } | 438 | } |
@@ -439,6 +442,11 @@ static inline bool d_is_autodir(const struct dentry *dentry) | |||
439 | return __d_entry_type(dentry) == DCACHE_AUTODIR_TYPE; | 442 | return __d_entry_type(dentry) == DCACHE_AUTODIR_TYPE; |
440 | } | 443 | } |
441 | 444 | ||
445 | static inline bool d_is_dir(const struct dentry *dentry) | ||
446 | { | ||
447 | return d_can_lookup(dentry) || d_is_autodir(dentry); | ||
448 | } | ||
449 | |||
442 | static inline bool d_is_symlink(const struct dentry *dentry) | 450 | static inline bool d_is_symlink(const struct dentry *dentry) |
443 | { | 451 | { |
444 | return __d_entry_type(dentry) == DCACHE_SYMLINK_TYPE; | 452 | return __d_entry_type(dentry) == DCACHE_SYMLINK_TYPE; |