diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2023-11-25 02:51:35 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2023-11-25 02:51:35 -0500 |
commit | 119dcc73a9c2df0da002054cdb2296cb32b7cb93 (patch) | |
tree | 0ce7c3532aef1af5055552df0fc7b0302a30c64f /include/linux/dcache.h | |
parent | ef69f0506d8f3a250ac5baa96746e17ae22c67b5 (diff) | |
parent | 6367b491c17a34b28aece294bddfda1a36ec0377 (diff) |
Merge branches 'work.dcache-misc' and 'work.dcache2' into work.dcache
Diffstat (limited to 'include/linux/dcache.h')
-rw-r--r-- | include/linux/dcache.h | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index 981f529c6cb5..b4449a1a47ff 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h @@ -68,12 +68,12 @@ extern const struct qstr dotdot_name; * large memory footprint increase). */ #ifdef CONFIG_64BIT -# define DNAME_INLINE_LEN 32 /* 192 bytes */ +# define DNAME_INLINE_LEN 40 /* 192 bytes */ #else # ifdef CONFIG_SMP -# define DNAME_INLINE_LEN 36 /* 128 bytes */ -# else # define DNAME_INLINE_LEN 40 /* 128 bytes */ +# else +# define DNAME_INLINE_LEN 44 /* 128 bytes */ # endif #endif @@ -101,8 +101,8 @@ struct dentry { struct list_head d_lru; /* LRU list */ wait_queue_head_t *d_wait; /* in-lookup ones only */ }; - struct list_head d_child; /* child of parent list */ - struct list_head d_subdirs; /* our children */ + struct hlist_node d_sib; /* child of parent list */ + struct hlist_head d_children; /* our children */ /* * d_alias and d_rcu can share memory */ @@ -564,4 +564,14 @@ struct name_snapshot { void take_dentry_name_snapshot(struct name_snapshot *, struct dentry *); void release_dentry_name_snapshot(struct name_snapshot *); +static inline struct dentry *d_first_child(const struct dentry *dentry) +{ + return hlist_entry_safe(dentry->d_children.first, struct dentry, d_sib); +} + +static inline struct dentry *d_next_sibling(const struct dentry *dentry) +{ + return hlist_entry_safe(dentry->d_sib.next, struct dentry, d_sib); +} + #endif /* __LINUX_DCACHE_H */ |