Commit 641c3ef5 authored by Al Viro's avatar Al Viro

DCACHE_... ->d_flags bits: switch to BIT()

For bits 20..22 (inode type cached in ->d_flags) turn the definitions into
expressions like (5 << 20); everything else turns into straight use of
BIT()
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 6d73c9ce
...@@ -151,13 +151,13 @@ struct dentry_operations { ...@@ -151,13 +151,13 @@ struct dentry_operations {
*/ */
/* d_flags entries */ /* d_flags entries */
#define DCACHE_OP_HASH 0x00000001 #define DCACHE_OP_HASH BIT(0)
#define DCACHE_OP_COMPARE 0x00000002 #define DCACHE_OP_COMPARE BIT(1)
#define DCACHE_OP_REVALIDATE 0x00000004 #define DCACHE_OP_REVALIDATE BIT(2)
#define DCACHE_OP_DELETE 0x00000008 #define DCACHE_OP_DELETE BIT(3)
#define DCACHE_OP_PRUNE 0x00000010 #define DCACHE_OP_PRUNE BIT(4)
#define DCACHE_DISCONNECTED 0x00000020 #define DCACHE_DISCONNECTED BIT(5)
/* This dentry is possibly not currently connected to the dcache tree, in /* This dentry is possibly not currently connected to the dcache tree, in
* which case its parent will either be itself, or will have this flag as * which case its parent will either be itself, or will have this flag as
* well. nfsd will not use a dentry with this bit set, but will first * well. nfsd will not use a dentry with this bit set, but will first
...@@ -168,50 +168,50 @@ struct dentry_operations { ...@@ -168,50 +168,50 @@ struct dentry_operations {
* dentry into place and return that dentry rather than the passed one, * dentry into place and return that dentry rather than the passed one,
* typically using d_splice_alias. */ * typically using d_splice_alias. */
#define DCACHE_REFERENCED 0x00000040 /* Recently used, don't discard. */ #define DCACHE_REFERENCED BIT(6) /* Recently used, don't discard. */
#define DCACHE_DONTCACHE 0x00000080 /* Purge from memory on final dput() */ #define DCACHE_DONTCACHE BIT(7) /* Purge from memory on final dput() */
#define DCACHE_CANT_MOUNT 0x00000100 #define DCACHE_CANT_MOUNT BIT(8)
#define DCACHE_GENOCIDE 0x00000200 #define DCACHE_GENOCIDE BIT(9)
#define DCACHE_SHRINK_LIST 0x00000400 #define DCACHE_SHRINK_LIST BIT(10)
#define DCACHE_OP_WEAK_REVALIDATE 0x00000800 #define DCACHE_OP_WEAK_REVALIDATE BIT(11)
#define DCACHE_NFSFS_RENAMED 0x00001000 #define DCACHE_NFSFS_RENAMED BIT(12)
/* this dentry has been "silly renamed" and has to be deleted on the last /* this dentry has been "silly renamed" and has to be deleted on the last
* dput() */ * dput() */
#define DCACHE_COOKIE 0x00002000 /* For use by dcookie subsystem */ #define DCACHE_COOKIE BIT(13) /* For use by dcookie subsystem */
#define DCACHE_FSNOTIFY_PARENT_WATCHED 0x00004000 #define DCACHE_FSNOTIFY_PARENT_WATCHED BIT(14)
/* Parent inode is watched by some fsnotify listener */ /* Parent inode is watched by some fsnotify listener */
#define DCACHE_DENTRY_KILLED 0x00008000 #define DCACHE_DENTRY_KILLED BIT(15)
#define DCACHE_MOUNTED 0x00010000 /* is a mountpoint */ #define DCACHE_MOUNTED BIT(16) /* is a mountpoint */
#define DCACHE_NEED_AUTOMOUNT 0x00020000 /* handle automount on this dir */ #define DCACHE_NEED_AUTOMOUNT BIT(17) /* handle automount on this dir */
#define DCACHE_MANAGE_TRANSIT 0x00040000 /* manage transit from this dirent */ #define DCACHE_MANAGE_TRANSIT BIT(18) /* manage transit from this dirent */
#define DCACHE_MANAGED_DENTRY \ #define DCACHE_MANAGED_DENTRY \
(DCACHE_MOUNTED|DCACHE_NEED_AUTOMOUNT|DCACHE_MANAGE_TRANSIT) (DCACHE_MOUNTED|DCACHE_NEED_AUTOMOUNT|DCACHE_MANAGE_TRANSIT)
#define DCACHE_LRU_LIST 0x00080000 #define DCACHE_LRU_LIST BIT(19)
#define DCACHE_ENTRY_TYPE 0x00700000 #define DCACHE_ENTRY_TYPE (7 << 20) /* bits 20..22 are for storing type: */
#define DCACHE_MISS_TYPE 0x00000000 /* Negative dentry (maybe fallthru to nowhere) */ #define DCACHE_MISS_TYPE (0 << 20) /* Negative dentry (maybe fallthru to nowhere) */
#define DCACHE_WHITEOUT_TYPE 0x00100000 /* Whiteout dentry (stop pathwalk) */ #define DCACHE_WHITEOUT_TYPE (1 << 20) /* Whiteout dentry (stop pathwalk) */
#define DCACHE_DIRECTORY_TYPE 0x00200000 /* Normal directory */ #define DCACHE_DIRECTORY_TYPE (2 << 20) /* Normal directory */
#define DCACHE_AUTODIR_TYPE 0x00300000 /* Lookupless directory (presumed automount) */ #define DCACHE_AUTODIR_TYPE (3 << 20) /* Lookupless directory (presumed automount) */
#define DCACHE_REGULAR_TYPE 0x00400000 /* Regular file type (or fallthru to such) */ #define DCACHE_REGULAR_TYPE (4 << 20) /* Regular file type (or fallthru to such) */
#define DCACHE_SPECIAL_TYPE 0x00500000 /* Other file type (or fallthru to such) */ #define DCACHE_SPECIAL_TYPE (5 << 20) /* Other file type (or fallthru to such) */
#define DCACHE_SYMLINK_TYPE 0x00600000 /* Symlink (or fallthru to such) */ #define DCACHE_SYMLINK_TYPE (6 << 20) /* Symlink (or fallthru to such) */
#define DCACHE_MAY_FREE 0x00800000 #define DCACHE_MAY_FREE BIT(23)
#define DCACHE_FALLTHRU 0x01000000 /* Fall through to lower layer */ #define DCACHE_FALLTHRU BIT(24) /* Fall through to lower layer */
#define DCACHE_NOKEY_NAME 0x02000000 /* Encrypted name encoded without key */ #define DCACHE_NOKEY_NAME BIT(25) /* Encrypted name encoded without key */
#define DCACHE_OP_REAL 0x04000000 #define DCACHE_OP_REAL BIT(26)
#define DCACHE_PAR_LOOKUP 0x10000000 /* being looked up (with parent locked shared) */ #define DCACHE_PAR_LOOKUP BIT(28) /* being looked up (with parent locked shared) */
#define DCACHE_DENTRY_CURSOR 0x20000000 #define DCACHE_DENTRY_CURSOR BIT(29)
#define DCACHE_NORCU 0x40000000 /* No RCU delay for freeing */ #define DCACHE_NORCU BIT(30) /* No RCU delay for freeing */
extern seqlock_t rename_lock; extern seqlock_t rename_lock;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment