.. | .. |
---|
63 | 63 | struct dentry_stat_t { |
---|
64 | 64 | long nr_dentry; |
---|
65 | 65 | long nr_unused; |
---|
66 | | - long age_limit; /* age in seconds */ |
---|
67 | | - long want_pages; /* pages requested by system */ |
---|
68 | | - long dummy[2]; |
---|
| 66 | + long age_limit; /* age in seconds */ |
---|
| 67 | + long want_pages; /* pages requested by system */ |
---|
| 68 | + long nr_negative; /* # of unused negative dentries */ |
---|
| 69 | + long dummy; /* Reserved for future use */ |
---|
69 | 70 | }; |
---|
70 | 71 | extern struct dentry_stat_t dentry_stat; |
---|
71 | 72 | |
---|
.. | .. |
---|
89 | 90 | struct dentry { |
---|
90 | 91 | /* RCU lookup touched fields */ |
---|
91 | 92 | unsigned int d_flags; /* protected by d_lock */ |
---|
92 | | - seqcount_t d_seq; /* per dentry seqlock */ |
---|
| 93 | + seqcount_spinlock_t d_seq; /* per dentry seqlock */ |
---|
93 | 94 | struct hlist_bl_node d_hash; /* lookup hash list */ |
---|
94 | 95 | struct dentry *d_parent; /* parent directory */ |
---|
95 | 96 | struct qstr d_name; |
---|
.. | .. |
---|
150 | 151 | struct vfsmount *(*d_automount)(struct path *); |
---|
151 | 152 | int (*d_manage)(const struct path *, bool); |
---|
152 | 153 | struct dentry *(*d_real)(struct dentry *, const struct inode *); |
---|
153 | | - |
---|
154 | | - ANDROID_KABI_USE(1, void (*d_canonical_path)(const struct path *, |
---|
155 | | - struct path *)); |
---|
| 154 | + void (*d_canonical_path)(const struct path *, struct path *); |
---|
| 155 | + ANDROID_KABI_RESERVE(1); |
---|
156 | 156 | ANDROID_KABI_RESERVE(2); |
---|
157 | 157 | ANDROID_KABI_RESERVE(3); |
---|
158 | 158 | ANDROID_KABI_RESERVE(4); |
---|
.. | .. |
---|
160 | 160 | |
---|
161 | 161 | /* |
---|
162 | 162 | * Locking rules for dentry_operations callbacks are to be found in |
---|
163 | | - * Documentation/filesystems/Locking. Keep it updated! |
---|
| 163 | + * Documentation/filesystems/locking.rst. Keep it updated! |
---|
164 | 164 | * |
---|
165 | | - * FUrther descriptions are found in Documentation/filesystems/vfs.txt. |
---|
| 165 | + * FUrther descriptions are found in Documentation/filesystems/vfs.rst. |
---|
166 | 166 | * Keep it updated too! |
---|
167 | 167 | */ |
---|
168 | 168 | |
---|
.. | .. |
---|
185 | 185 | * typically using d_splice_alias. */ |
---|
186 | 186 | |
---|
187 | 187 | #define DCACHE_REFERENCED 0x00000040 /* Recently used, don't discard. */ |
---|
| 188 | + |
---|
| 189 | +#define DCACHE_DONTCACHE 0x00000080 /* Purge from memory on final dput() */ |
---|
188 | 190 | |
---|
189 | 191 | #define DCACHE_CANT_MOUNT 0x00000100 |
---|
190 | 192 | #define DCACHE_GENOCIDE 0x00000200 |
---|
.. | .. |
---|
220 | 222 | |
---|
221 | 223 | #define DCACHE_MAY_FREE 0x00800000 |
---|
222 | 224 | #define DCACHE_FALLTHRU 0x01000000 /* Fall through to lower layer */ |
---|
223 | | -#define DCACHE_ENCRYPTED_NAME 0x02000000 /* Encrypted name (dir key was unavailable) */ |
---|
| 225 | +#define DCACHE_NOKEY_NAME 0x02000000 /* Encrypted name encoded without key */ |
---|
224 | 226 | #define DCACHE_OP_REAL 0x04000000 |
---|
225 | 227 | |
---|
226 | 228 | #define DCACHE_PAR_LOOKUP 0x10000000 /* being looked up (with parent locked shared) */ |
---|
.. | .. |
---|
244 | 246 | /* allocate/de-allocate */ |
---|
245 | 247 | extern struct dentry * d_alloc(struct dentry *, const struct qstr *); |
---|
246 | 248 | extern struct dentry * d_alloc_anon(struct super_block *); |
---|
247 | | -extern struct dentry * d_alloc_pseudo(struct super_block *, const struct qstr *); |
---|
248 | 249 | extern struct dentry * d_alloc_parallel(struct dentry *, const struct qstr *, |
---|
249 | 250 | wait_queue_head_t *); |
---|
250 | 251 | extern struct dentry * d_splice_alias(struct inode *, struct dentry *); |
---|
.. | .. |
---|
301 | 302 | */ |
---|
302 | 303 | extern __printf(4, 5) |
---|
303 | 304 | char *dynamic_dname(struct dentry *, char *, int, const char *, ...); |
---|
304 | | -extern char *simple_dname(struct dentry *, char *, int); |
---|
305 | 305 | |
---|
306 | 306 | extern char *__d_path(const struct path *, const struct path *, char *, int); |
---|
307 | 307 | extern char *d_absolute_path(const struct path *, char *, int); |
---|
.. | .. |
---|
451 | 451 | return d_is_miss(dentry); |
---|
452 | 452 | } |
---|
453 | 453 | |
---|
| 454 | +static inline bool d_flags_negative(unsigned flags) |
---|
| 455 | +{ |
---|
| 456 | + return (flags & DCACHE_ENTRY_TYPE) == DCACHE_MISS_TYPE; |
---|
| 457 | +} |
---|
| 458 | + |
---|
454 | 459 | static inline bool d_is_positive(const struct dentry *dentry) |
---|
455 | 460 | { |
---|
456 | 461 | return !d_is_negative(dentry); |
---|
.. | .. |
---|
578 | 583 | * If dentry is on a union/overlay, then return the underlying, real dentry. |
---|
579 | 584 | * Otherwise return the dentry itself. |
---|
580 | 585 | * |
---|
581 | | - * See also: Documentation/filesystems/vfs.txt |
---|
| 586 | + * See also: Documentation/filesystems/vfs.rst |
---|
582 | 587 | */ |
---|
583 | 588 | static inline struct dentry *d_real(struct dentry *dentry, |
---|
584 | 589 | const struct inode *inode) |
---|
.. | .. |
---|
603 | 608 | } |
---|
604 | 609 | |
---|
605 | 610 | struct name_snapshot { |
---|
606 | | - const unsigned char *name; |
---|
| 611 | + struct qstr name; |
---|
607 | 612 | unsigned char inline_name[DNAME_INLINE_LEN]; |
---|
608 | 613 | }; |
---|
609 | 614 | void take_dentry_name_snapshot(struct name_snapshot *, struct dentry *); |
---|