aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/linux-2.6/kmem.h
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2005-10-21 03:20:48 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-10-28 11:16:47 -0400
commit27496a8c67bef4d789d8e3c8317ca35813a507ae (patch)
treefe99a34fe5a800e41af61853e7444ddddf45d014 /fs/xfs/linux-2.6/kmem.h
parent7d877f3bda870ab5f001bd92528654471d5966b3 (diff)
[PATCH] gfp_t: fs/*
- ->releasepage() annotated (s/int/gfp_t), instances updated - missing gfp_t in fs/* added - fixed misannotation from the original sweep caught by bitwise checks: XFS used __nocast both for gfp_t and for flags used by XFS allocator. The latter left with unsigned int __nocast; we might want to add a different type for those but for now let's leave them alone. That, BTW, is a case when __nocast use had been actively confusing - it had been used in the same code for two different and similar types, with no way to catch misuses. Switch of gfp_t to bitwise had caught that immediately... One tricky bit is left alone to be dealt with later - mapping->flags is a mix of gfp_t and error indications. Left alone for now. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/xfs/linux-2.6/kmem.h')
-rw-r--r--fs/xfs/linux-2.6/kmem.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/fs/xfs/linux-2.6/kmem.h b/fs/xfs/linux-2.6/kmem.h
index ee7010f085bc..f4bb78c268c0 100644
--- a/fs/xfs/linux-2.6/kmem.h
+++ b/fs/xfs/linux-2.6/kmem.h
@@ -81,9 +81,9 @@ typedef unsigned long xfs_pflags_t;
81 *(NSTATEP) = *(OSTATEP); \ 81 *(NSTATEP) = *(OSTATEP); \
82} while (0) 82} while (0)
83 83
84static __inline unsigned int kmem_flags_convert(gfp_t flags) 84static __inline gfp_t kmem_flags_convert(unsigned int __nocast flags)
85{ 85{
86 unsigned int lflags = __GFP_NOWARN; /* we'll report problems, if need be */ 86 gfp_t lflags = __GFP_NOWARN; /* we'll report problems, if need be */
87 87
88#ifdef DEBUG 88#ifdef DEBUG
89 if (unlikely(flags & ~(KM_SLEEP|KM_NOSLEEP|KM_NOFS|KM_MAYFAIL))) { 89 if (unlikely(flags & ~(KM_SLEEP|KM_NOSLEEP|KM_NOFS|KM_MAYFAIL))) {
@@ -125,16 +125,16 @@ kmem_zone_destroy(kmem_zone_t *zone)
125 BUG(); 125 BUG();
126} 126}
127 127
128extern void *kmem_zone_zalloc(kmem_zone_t *, gfp_t); 128extern void *kmem_zone_zalloc(kmem_zone_t *, unsigned int __nocast);
129extern void *kmem_zone_alloc(kmem_zone_t *, gfp_t); 129extern void *kmem_zone_alloc(kmem_zone_t *, unsigned int __nocast);
130 130
131extern void *kmem_alloc(size_t, gfp_t); 131extern void *kmem_alloc(size_t, unsigned int __nocast);
132extern void *kmem_realloc(void *, size_t, size_t, gfp_t); 132extern void *kmem_realloc(void *, size_t, size_t, unsigned int __nocast);
133extern void *kmem_zalloc(size_t, gfp_t); 133extern void *kmem_zalloc(size_t, unsigned int __nocast);
134extern void kmem_free(void *, size_t); 134extern void kmem_free(void *, size_t);
135 135
136typedef struct shrinker *kmem_shaker_t; 136typedef struct shrinker *kmem_shaker_t;
137typedef int (*kmem_shake_func_t)(int, unsigned int); 137typedef int (*kmem_shake_func_t)(int, gfp_t);
138 138
139static __inline kmem_shaker_t 139static __inline kmem_shaker_t
140kmem_shake_register(kmem_shake_func_t sfunc) 140kmem_shake_register(kmem_shake_func_t sfunc)
@@ -149,7 +149,7 @@ kmem_shake_deregister(kmem_shaker_t shrinker)
149} 149}
150 150
151static __inline int 151static __inline int
152kmem_shake_allow(unsigned int gfp_mask) 152kmem_shake_allow(gfp_t gfp_mask)
153{ 153{
154 return (gfp_mask & __GFP_WAIT); 154 return (gfp_mask & __GFP_WAIT);
155} 155}