diff options
author | Al Viro <viro@ftp.linux.org.uk> | 2005-10-07 02:46:04 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-08 18:00:57 -0400 |
commit | dd0fc66fb33cd610bc1a5db8a5e232d34879b4d7 (patch) | |
tree | 51f96a9db96293b352e358f66032e1f4ff79fafb /fs/bio.c | |
parent | 3b0e77bd144203a507eb191f7117d2c5004ea1de (diff) |
[PATCH] gfp flags annotations - part 1
- added typedef unsigned int __nocast gfp_t;
- replaced __nocast uses for gfp flags with gfp_t - it gives exactly
the same warnings as far as sparse is concerned, doesn't change
generated code (from gcc point of view we replaced unsigned int with
typedef) and documents what's going on far better.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/bio.c')
-rw-r--r-- | fs/bio.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -75,7 +75,7 @@ struct bio_set { | |||
75 | */ | 75 | */ |
76 | static struct bio_set *fs_bio_set; | 76 | static struct bio_set *fs_bio_set; |
77 | 77 | ||
78 | static inline struct bio_vec *bvec_alloc_bs(unsigned int __nocast gfp_mask, int nr, unsigned long *idx, struct bio_set *bs) | 78 | static inline struct bio_vec *bvec_alloc_bs(gfp_t gfp_mask, int nr, unsigned long *idx, struct bio_set *bs) |
79 | { | 79 | { |
80 | struct bio_vec *bvl; | 80 | struct bio_vec *bvl; |
81 | struct biovec_slab *bp; | 81 | struct biovec_slab *bp; |
@@ -155,7 +155,7 @@ inline void bio_init(struct bio *bio) | |||
155 | * allocate bio and iovecs from the memory pools specified by the | 155 | * allocate bio and iovecs from the memory pools specified by the |
156 | * bio_set structure. | 156 | * bio_set structure. |
157 | **/ | 157 | **/ |
158 | struct bio *bio_alloc_bioset(unsigned int __nocast gfp_mask, int nr_iovecs, struct bio_set *bs) | 158 | struct bio *bio_alloc_bioset(gfp_t gfp_mask, int nr_iovecs, struct bio_set *bs) |
159 | { | 159 | { |
160 | struct bio *bio = mempool_alloc(bs->bio_pool, gfp_mask); | 160 | struct bio *bio = mempool_alloc(bs->bio_pool, gfp_mask); |
161 | 161 | ||
@@ -181,7 +181,7 @@ out: | |||
181 | return bio; | 181 | return bio; |
182 | } | 182 | } |
183 | 183 | ||
184 | struct bio *bio_alloc(unsigned int __nocast gfp_mask, int nr_iovecs) | 184 | struct bio *bio_alloc(gfp_t gfp_mask, int nr_iovecs) |
185 | { | 185 | { |
186 | struct bio *bio = bio_alloc_bioset(gfp_mask, nr_iovecs, fs_bio_set); | 186 | struct bio *bio = bio_alloc_bioset(gfp_mask, nr_iovecs, fs_bio_set); |
187 | 187 | ||
@@ -277,7 +277,7 @@ inline void __bio_clone(struct bio *bio, struct bio *bio_src) | |||
277 | * | 277 | * |
278 | * Like __bio_clone, only also allocates the returned bio | 278 | * Like __bio_clone, only also allocates the returned bio |
279 | */ | 279 | */ |
280 | struct bio *bio_clone(struct bio *bio, unsigned int __nocast gfp_mask) | 280 | struct bio *bio_clone(struct bio *bio, gfp_t gfp_mask) |
281 | { | 281 | { |
282 | struct bio *b = bio_alloc_bioset(gfp_mask, bio->bi_max_vecs, fs_bio_set); | 282 | struct bio *b = bio_alloc_bioset(gfp_mask, bio->bi_max_vecs, fs_bio_set); |
283 | 283 | ||
@@ -1078,7 +1078,7 @@ struct bio_pair *bio_split(struct bio *bi, mempool_t *pool, int first_sectors) | |||
1078 | return bp; | 1078 | return bp; |
1079 | } | 1079 | } |
1080 | 1080 | ||
1081 | static void *bio_pair_alloc(unsigned int __nocast gfp_flags, void *data) | 1081 | static void *bio_pair_alloc(gfp_t gfp_flags, void *data) |
1082 | { | 1082 | { |
1083 | return kmalloc(sizeof(struct bio_pair), gfp_flags); | 1083 | return kmalloc(sizeof(struct bio_pair), gfp_flags); |
1084 | } | 1084 | } |