@@ -173,65 +173,59 @@ struct dentry_operations {
173173 */
174174
175175/* d_flags entries */
176- #define DCACHE_OP_HASH BIT(0)
177- #define DCACHE_OP_COMPARE BIT(1)
178- #define DCACHE_OP_REVALIDATE BIT(2)
179- #define DCACHE_OP_DELETE BIT(3)
180- #define DCACHE_OP_PRUNE BIT(4)
181-
182- #define DCACHE_DISCONNECTED BIT(5)
183- /* This dentry is possibly not currently connected to the dcache tree, in
184- * which case its parent will either be itself, or will have this flag as
185- * well. nfsd will not use a dentry with this bit set, but will first
186- * endeavour to clear the bit either by discovering that it is connected,
187- * or by performing lookup operations. Any filesystem which supports
188- * nfsd_operations MUST have a lookup function which, if it finds a
189- * directory inode with a DCACHE_DISCONNECTED dentry, will d_move that
190- * dentry into place and return that dentry rather than the passed one,
191- * typically using d_splice_alias. */
192-
193- #define DCACHE_REFERENCED BIT(6) /* Recently used, don't discard. */
194-
195- #define DCACHE_DONTCACHE BIT(7) /* Purge from memory on final dput() */
196-
197- #define DCACHE_CANT_MOUNT BIT(8)
198- #define DCACHE_GENOCIDE BIT(9)
199- #define DCACHE_SHRINK_LIST BIT(10)
200-
201- #define DCACHE_OP_WEAK_REVALIDATE BIT(11)
202-
203- #define DCACHE_NFSFS_RENAMED BIT(12)
204- /* this dentry has been "silly renamed" and has to be deleted on the last
205- * dput() */
206- #define DCACHE_FSNOTIFY_PARENT_WATCHED BIT(13)
207- /* Parent inode is watched by some fsnotify listener */
208-
209- #define DCACHE_DENTRY_KILLED BIT(14)
210-
211- #define DCACHE_MOUNTED BIT(15) /* is a mountpoint */
212- #define DCACHE_NEED_AUTOMOUNT BIT(16) /* handle automount on this dir */
213- #define DCACHE_MANAGE_TRANSIT BIT(17) /* manage transit from this dirent */
176+ enum dentry_flags {
177+ DCACHE_OP_HASH = BIT (0 ),
178+ DCACHE_OP_COMPARE = BIT (1 ),
179+ DCACHE_OP_REVALIDATE = BIT (2 ),
180+ DCACHE_OP_DELETE = BIT (3 ),
181+ DCACHE_OP_PRUNE = BIT (4 ),
182+ /*
183+ * This dentry is possibly not currently connected to the dcache tree,
184+ * in which case its parent will either be itself, or will have this
185+ * flag as well. nfsd will not use a dentry with this bit set, but will
186+ * first endeavour to clear the bit either by discovering that it is
187+ * connected, or by performing lookup operations. Any filesystem which
188+ * supports nfsd_operations MUST have a lookup function which, if it
189+ * finds a directory inode with a DCACHE_DISCONNECTED dentry, will
190+ * d_move that dentry into place and return that dentry rather than the
191+ * passed one, typically using d_splice_alias.
192+ */
193+ DCACHE_DISCONNECTED = BIT (5 ),
194+ DCACHE_REFERENCED = BIT (6 ), /* Recently used, don't discard. */
195+ DCACHE_DONTCACHE = BIT (7 ), /* Purge from memory on final dput() */
196+ DCACHE_CANT_MOUNT = BIT (8 ),
197+ DCACHE_GENOCIDE = BIT (9 ),
198+ DCACHE_SHRINK_LIST = BIT (10 ),
199+ DCACHE_OP_WEAK_REVALIDATE = BIT (11 ),
200+ /*
201+ * this dentry has been "silly renamed" and has to be deleted on the
202+ * last dput()
203+ */
204+ DCACHE_NFSFS_RENAMED = BIT (12 ),
205+ DCACHE_FSNOTIFY_PARENT_WATCHED = BIT (13 ), /* Parent inode is watched by some fsnotify listener */
206+ DCACHE_DENTRY_KILLED = BIT (14 ),
207+ DCACHE_MOUNTED = BIT (15 ), /* is a mountpoint */
208+ DCACHE_NEED_AUTOMOUNT = BIT (16 ), /* handle automount on this dir */
209+ DCACHE_MANAGE_TRANSIT = BIT (17 ), /* manage transit from this dirent */
210+ DCACHE_LRU_LIST = BIT (18 ),
211+ DCACHE_ENTRY_TYPE = (7 << 19 ), /* bits 19..21 are for storing type: */
212+ DCACHE_MISS_TYPE = (0 << 19 ), /* Negative dentry */
213+ DCACHE_WHITEOUT_TYPE = (1 << 19 ), /* Whiteout dentry (stop pathwalk) */
214+ DCACHE_DIRECTORY_TYPE = (2 << 19 ), /* Normal directory */
215+ DCACHE_AUTODIR_TYPE = (3 << 19 ), /* Lookupless directory (presumed automount) */
216+ DCACHE_REGULAR_TYPE = (4 << 19 ), /* Regular file type */
217+ DCACHE_SPECIAL_TYPE = (5 << 19 ), /* Other file type */
218+ DCACHE_SYMLINK_TYPE = (6 << 19 ), /* Symlink */
219+ DCACHE_NOKEY_NAME = BIT (22 ), /* Encrypted name encoded without key */
220+ DCACHE_OP_REAL = BIT (23 ),
221+ DCACHE_PAR_LOOKUP = BIT (24 ), /* being looked up (with parent locked shared) */
222+ DCACHE_DENTRY_CURSOR = BIT (25 ),
223+ DCACHE_NORCU = BIT (26 ), /* No RCU delay for freeing */
224+ };
225+
214226#define DCACHE_MANAGED_DENTRY \
215227 (DCACHE_MOUNTED|DCACHE_NEED_AUTOMOUNT|DCACHE_MANAGE_TRANSIT)
216228
217- #define DCACHE_LRU_LIST BIT(18)
218-
219- #define DCACHE_ENTRY_TYPE (7 << 19) /* bits 19..21 are for storing type: */
220- #define DCACHE_MISS_TYPE (0 << 19) /* Negative dentry */
221- #define DCACHE_WHITEOUT_TYPE (1 << 19) /* Whiteout dentry (stop pathwalk) */
222- #define DCACHE_DIRECTORY_TYPE (2 << 19) /* Normal directory */
223- #define DCACHE_AUTODIR_TYPE (3 << 19) /* Lookupless directory (presumed automount) */
224- #define DCACHE_REGULAR_TYPE (4 << 19) /* Regular file type */
225- #define DCACHE_SPECIAL_TYPE (5 << 19) /* Other file type */
226- #define DCACHE_SYMLINK_TYPE (6 << 19) /* Symlink */
227-
228- #define DCACHE_NOKEY_NAME BIT(22) /* Encrypted name encoded without key */
229- #define DCACHE_OP_REAL BIT(23)
230-
231- #define DCACHE_PAR_LOOKUP BIT(24) /* being looked up (with parent locked shared) */
232- #define DCACHE_DENTRY_CURSOR BIT(25)
233- #define DCACHE_NORCU BIT(26) /* No RCU delay for freeing */
234-
235229extern seqlock_t rename_lock ;
236230
237231/*
0 commit comments