aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/linux-2.6/kmem.c
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.c
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.c')
-rw-r--r--fs/xfs/linux-2.6/kmem.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/fs/xfs/linux-2.6/kmem.c b/fs/xfs/linux-2.6/kmem.c
index d2653b589b1c..3c92162dc728 100644
--- a/fs/xfs/linux-2.6/kmem.c
+++ b/fs/xfs/linux-2.6/kmem.c
@@ -45,11 +45,11 @@
45 45
46 46
47void * 47void *
48kmem_alloc(size_t size, gfp_t flags) 48kmem_alloc(size_t size, unsigned int __nocast flags)
49{ 49{
50 int retries = 0; 50 int retries = 0;
51 unsigned int lflags = kmem_flags_convert(flags); 51 gfp_t lflags = kmem_flags_convert(flags);
52 void *ptr; 52 void *ptr;
53 53
54 do { 54 do {
55 if (size < MAX_SLAB_SIZE || retries > MAX_VMALLOCS) 55 if (size < MAX_SLAB_SIZE || retries > MAX_VMALLOCS)
@@ -67,7 +67,7 @@ kmem_alloc(size_t size, gfp_t flags)
67} 67}
68 68
69void * 69void *
70kmem_zalloc(size_t size, gfp_t flags) 70kmem_zalloc(size_t size, unsigned int __nocast flags)
71{ 71{
72 void *ptr; 72 void *ptr;
73 73
@@ -90,7 +90,7 @@ kmem_free(void *ptr, size_t size)
90 90
91void * 91void *
92kmem_realloc(void *ptr, size_t newsize, size_t oldsize, 92kmem_realloc(void *ptr, size_t newsize, size_t oldsize,
93 gfp_t flags) 93 unsigned int __nocast flags)
94{ 94{
95 void *new; 95 void *new;
96 96
@@ -105,11 +105,11 @@ kmem_realloc(void *ptr, size_t newsize, size_t oldsize,
105} 105}
106 106
107void * 107void *
108kmem_zone_alloc(kmem_zone_t *zone, gfp_t flags) 108kmem_zone_alloc(kmem_zone_t *zone, unsigned int __nocast flags)
109{ 109{
110 int retries = 0; 110 int retries = 0;
111 unsigned int lflags = kmem_flags_convert(flags); 111 gfp_t lflags = kmem_flags_convert(flags);
112 void *ptr; 112 void *ptr;
113 113
114 do { 114 do {
115 ptr = kmem_cache_alloc(zone, lflags); 115 ptr = kmem_cache_alloc(zone, lflags);
@@ -124,7 +124,7 @@ kmem_zone_alloc(kmem_zone_t *zone, gfp_t flags)
124} 124}
125 125
126void * 126void *
127kmem_zone_zalloc(kmem_zone_t *zone, gfp_t flags) 127kmem_zone_zalloc(kmem_zone_t *zone, unsigned int __nocast flags)
128{ 128{
129 void *ptr; 129 void *ptr;
130 130