diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-04-02 06:24:04 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-05-29 23:28:32 -0400 |
commit | 77ba78776e90e8de541f13b326e284c74286252f (patch) | |
tree | ea05703a21e255484462b947e5f15ffd781163cd /fs/xfs/kmem.h | |
parent | c217a2a004d98d09dfceec3a023c563ed800e833 (diff) |
xfs: switch to proper __bitwise type for KM_... flags
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/xfs/kmem.h')
-rw-r--r-- | fs/xfs/kmem.h | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/fs/xfs/kmem.h b/fs/xfs/kmem.h index ab7c53fe346e..b2f2620f9a87 100644 --- a/fs/xfs/kmem.h +++ b/fs/xfs/kmem.h | |||
@@ -27,10 +27,11 @@ | |||
27 | * General memory allocation interfaces | 27 | * General memory allocation interfaces |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #define KM_SLEEP 0x0001u | 30 | typedef unsigned __bitwise xfs_km_flags_t; |
31 | #define KM_NOSLEEP 0x0002u | 31 | #define KM_SLEEP ((__force xfs_km_flags_t)0x0001u) |
32 | #define KM_NOFS 0x0004u | 32 | #define KM_NOSLEEP ((__force xfs_km_flags_t)0x0002u) |
33 | #define KM_MAYFAIL 0x0008u | 33 | #define KM_NOFS ((__force xfs_km_flags_t)0x0004u) |
34 | #define KM_MAYFAIL ((__force xfs_km_flags_t)0x0008u) | ||
34 | 35 | ||
35 | /* | 36 | /* |
36 | * We use a special process flag to avoid recursive callbacks into | 37 | * We use a special process flag to avoid recursive callbacks into |
@@ -38,7 +39,7 @@ | |||
38 | * warnings, so we explicitly skip any generic ones (silly of us). | 39 | * warnings, so we explicitly skip any generic ones (silly of us). |
39 | */ | 40 | */ |
40 | static inline gfp_t | 41 | static inline gfp_t |
41 | kmem_flags_convert(unsigned int __nocast flags) | 42 | kmem_flags_convert(xfs_km_flags_t flags) |
42 | { | 43 | { |
43 | gfp_t lflags; | 44 | gfp_t lflags; |
44 | 45 | ||
@@ -54,9 +55,9 @@ kmem_flags_convert(unsigned int __nocast flags) | |||
54 | return lflags; | 55 | return lflags; |
55 | } | 56 | } |
56 | 57 | ||
57 | extern void *kmem_alloc(size_t, unsigned int __nocast); | 58 | extern void *kmem_alloc(size_t, xfs_km_flags_t); |
58 | extern void *kmem_zalloc(size_t, unsigned int __nocast); | 59 | extern void *kmem_zalloc(size_t, xfs_km_flags_t); |
59 | extern void *kmem_realloc(const void *, size_t, size_t, unsigned int __nocast); | 60 | extern void *kmem_realloc(const void *, size_t, size_t, xfs_km_flags_t); |
60 | extern void kmem_free(const void *); | 61 | extern void kmem_free(const void *); |
61 | 62 | ||
62 | static inline void *kmem_zalloc_large(size_t size) | 63 | static inline void *kmem_zalloc_large(size_t size) |
@@ -107,7 +108,7 @@ kmem_zone_destroy(kmem_zone_t *zone) | |||
107 | kmem_cache_destroy(zone); | 108 | kmem_cache_destroy(zone); |
108 | } | 109 | } |
109 | 110 | ||
110 | extern void *kmem_zone_alloc(kmem_zone_t *, unsigned int __nocast); | 111 | extern void *kmem_zone_alloc(kmem_zone_t *, xfs_km_flags_t); |
111 | extern void *kmem_zone_zalloc(kmem_zone_t *, unsigned int __nocast); | 112 | extern void *kmem_zone_zalloc(kmem_zone_t *, xfs_km_flags_t); |
112 | 113 | ||
113 | #endif /* __XFS_SUPPORT_KMEM_H__ */ | 114 | #endif /* __XFS_SUPPORT_KMEM_H__ */ |