diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2005-10-21 03:18:50 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-28 11:16:47 -0400 |
commit | 6daa0e28627abf362138244a620a821a9027d816 (patch) | |
tree | 5ca9cbc421cc1adf228cdd30cd627bca8be6242c /mm | |
parent | af4ca457eaf2d6682059c18463eb106e2ce58198 (diff) |
[PATCH] gfp_t: mm/* (easy parts)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/filemap.c | 8 | ||||
-rw-r--r-- | mm/mempool.c | 2 | ||||
-rw-r--r-- | mm/shmem.c | 4 | ||||
-rw-r--r-- | mm/slab.c | 8 | ||||
-rw-r--r-- | mm/vmscan.c | 8 |
5 files changed, 15 insertions, 15 deletions
diff --git a/mm/filemap.c b/mm/filemap.c index b5346576e58d..1c31b2fd2ca5 100644 --- a/mm/filemap.c +++ b/mm/filemap.c | |||
@@ -377,7 +377,7 @@ int filemap_write_and_wait_range(struct address_space *mapping, | |||
377 | * This function does not add the page to the LRU. The caller must do that. | 377 | * This function does not add the page to the LRU. The caller must do that. |
378 | */ | 378 | */ |
379 | int add_to_page_cache(struct page *page, struct address_space *mapping, | 379 | int add_to_page_cache(struct page *page, struct address_space *mapping, |
380 | pgoff_t offset, int gfp_mask) | 380 | pgoff_t offset, gfp_t gfp_mask) |
381 | { | 381 | { |
382 | int error = radix_tree_preload(gfp_mask & ~__GFP_HIGHMEM); | 382 | int error = radix_tree_preload(gfp_mask & ~__GFP_HIGHMEM); |
383 | 383 | ||
@@ -401,7 +401,7 @@ int add_to_page_cache(struct page *page, struct address_space *mapping, | |||
401 | EXPORT_SYMBOL(add_to_page_cache); | 401 | EXPORT_SYMBOL(add_to_page_cache); |
402 | 402 | ||
403 | int add_to_page_cache_lru(struct page *page, struct address_space *mapping, | 403 | int add_to_page_cache_lru(struct page *page, struct address_space *mapping, |
404 | pgoff_t offset, int gfp_mask) | 404 | pgoff_t offset, gfp_t gfp_mask) |
405 | { | 405 | { |
406 | int ret = add_to_page_cache(page, mapping, offset, gfp_mask); | 406 | int ret = add_to_page_cache(page, mapping, offset, gfp_mask); |
407 | if (ret == 0) | 407 | if (ret == 0) |
@@ -591,7 +591,7 @@ EXPORT_SYMBOL(find_lock_page); | |||
591 | * memory exhaustion. | 591 | * memory exhaustion. |
592 | */ | 592 | */ |
593 | struct page *find_or_create_page(struct address_space *mapping, | 593 | struct page *find_or_create_page(struct address_space *mapping, |
594 | unsigned long index, unsigned int gfp_mask) | 594 | unsigned long index, gfp_t gfp_mask) |
595 | { | 595 | { |
596 | struct page *page, *cached_page = NULL; | 596 | struct page *page, *cached_page = NULL; |
597 | int err; | 597 | int err; |
@@ -683,7 +683,7 @@ struct page * | |||
683 | grab_cache_page_nowait(struct address_space *mapping, unsigned long index) | 683 | grab_cache_page_nowait(struct address_space *mapping, unsigned long index) |
684 | { | 684 | { |
685 | struct page *page = find_get_page(mapping, index); | 685 | struct page *page = find_get_page(mapping, index); |
686 | unsigned int gfp_mask; | 686 | gfp_t gfp_mask; |
687 | 687 | ||
688 | if (page) { | 688 | if (page) { |
689 | if (!TestSetPageLocked(page)) | 689 | if (!TestSetPageLocked(page)) |
diff --git a/mm/mempool.c b/mm/mempool.c index 9e377ea700b2..1a99b80480d3 100644 --- a/mm/mempool.c +++ b/mm/mempool.c | |||
@@ -205,7 +205,7 @@ void * mempool_alloc(mempool_t *pool, gfp_t gfp_mask) | |||
205 | void *element; | 205 | void *element; |
206 | unsigned long flags; | 206 | unsigned long flags; |
207 | wait_queue_t wait; | 207 | wait_queue_t wait; |
208 | unsigned int gfp_temp; | 208 | gfp_t gfp_temp; |
209 | 209 | ||
210 | might_sleep_if(gfp_mask & __GFP_WAIT); | 210 | might_sleep_if(gfp_mask & __GFP_WAIT); |
211 | 211 | ||
diff --git a/mm/shmem.c b/mm/shmem.c index ea064d89cda9..55e04a0734c1 100644 --- a/mm/shmem.c +++ b/mm/shmem.c | |||
@@ -85,7 +85,7 @@ enum sgp_type { | |||
85 | static int shmem_getpage(struct inode *inode, unsigned long idx, | 85 | static int shmem_getpage(struct inode *inode, unsigned long idx, |
86 | struct page **pagep, enum sgp_type sgp, int *type); | 86 | struct page **pagep, enum sgp_type sgp, int *type); |
87 | 87 | ||
88 | static inline struct page *shmem_dir_alloc(unsigned int gfp_mask) | 88 | static inline struct page *shmem_dir_alloc(gfp_t gfp_mask) |
89 | { | 89 | { |
90 | /* | 90 | /* |
91 | * The above definition of ENTRIES_PER_PAGE, and the use of | 91 | * The above definition of ENTRIES_PER_PAGE, and the use of |
@@ -898,7 +898,7 @@ struct page *shmem_swapin(struct shmem_inode_info *info, swp_entry_t entry, | |||
898 | } | 898 | } |
899 | 899 | ||
900 | static struct page * | 900 | static struct page * |
901 | shmem_alloc_page(unsigned long gfp, struct shmem_inode_info *info, | 901 | shmem_alloc_page(gfp_t gfp, struct shmem_inode_info *info, |
902 | unsigned long idx) | 902 | unsigned long idx) |
903 | { | 903 | { |
904 | struct vm_area_struct pvma; | 904 | struct vm_area_struct pvma; |
@@ -386,7 +386,7 @@ struct kmem_cache_s { | |||
386 | unsigned int gfporder; | 386 | unsigned int gfporder; |
387 | 387 | ||
388 | /* force GFP flags, e.g. GFP_DMA */ | 388 | /* force GFP flags, e.g. GFP_DMA */ |
389 | unsigned int gfpflags; | 389 | gfp_t gfpflags; |
390 | 390 | ||
391 | size_t colour; /* cache colouring range */ | 391 | size_t colour; /* cache colouring range */ |
392 | unsigned int colour_off; /* colour offset */ | 392 | unsigned int colour_off; /* colour offset */ |
@@ -2117,7 +2117,7 @@ static void cache_init_objs(kmem_cache_t *cachep, | |||
2117 | slabp->free = 0; | 2117 | slabp->free = 0; |
2118 | } | 2118 | } |
2119 | 2119 | ||
2120 | static void kmem_flagcheck(kmem_cache_t *cachep, unsigned int flags) | 2120 | static void kmem_flagcheck(kmem_cache_t *cachep, gfp_t flags) |
2121 | { | 2121 | { |
2122 | if (flags & SLAB_DMA) { | 2122 | if (flags & SLAB_DMA) { |
2123 | if (!(cachep->gfpflags & GFP_DMA)) | 2123 | if (!(cachep->gfpflags & GFP_DMA)) |
@@ -2152,7 +2152,7 @@ static int cache_grow(kmem_cache_t *cachep, gfp_t flags, int nodeid) | |||
2152 | struct slab *slabp; | 2152 | struct slab *slabp; |
2153 | void *objp; | 2153 | void *objp; |
2154 | size_t offset; | 2154 | size_t offset; |
2155 | unsigned int local_flags; | 2155 | gfp_t local_flags; |
2156 | unsigned long ctor_flags; | 2156 | unsigned long ctor_flags; |
2157 | struct kmem_list3 *l3; | 2157 | struct kmem_list3 *l3; |
2158 | 2158 | ||
@@ -2546,7 +2546,7 @@ static inline void *__cache_alloc(kmem_cache_t *cachep, gfp_t flags) | |||
2546 | /* | 2546 | /* |
2547 | * A interface to enable slab creation on nodeid | 2547 | * A interface to enable slab creation on nodeid |
2548 | */ | 2548 | */ |
2549 | static void *__cache_alloc_node(kmem_cache_t *cachep, int flags, int nodeid) | 2549 | static void *__cache_alloc_node(kmem_cache_t *cachep, gfp_t flags, int nodeid) |
2550 | { | 2550 | { |
2551 | struct list_head *entry; | 2551 | struct list_head *entry; |
2552 | struct slab *slabp; | 2552 | struct slab *slabp; |
diff --git a/mm/vmscan.c b/mm/vmscan.c index 64f9570cff56..843c87d1e61f 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c | |||
@@ -70,7 +70,7 @@ struct scan_control { | |||
70 | unsigned int priority; | 70 | unsigned int priority; |
71 | 71 | ||
72 | /* This context's GFP mask */ | 72 | /* This context's GFP mask */ |
73 | unsigned int gfp_mask; | 73 | gfp_t gfp_mask; |
74 | 74 | ||
75 | int may_writepage; | 75 | int may_writepage; |
76 | 76 | ||
@@ -186,7 +186,7 @@ EXPORT_SYMBOL(remove_shrinker); | |||
186 | * | 186 | * |
187 | * Returns the number of slab objects which we shrunk. | 187 | * Returns the number of slab objects which we shrunk. |
188 | */ | 188 | */ |
189 | static int shrink_slab(unsigned long scanned, unsigned int gfp_mask, | 189 | static int shrink_slab(unsigned long scanned, gfp_t gfp_mask, |
190 | unsigned long lru_pages) | 190 | unsigned long lru_pages) |
191 | { | 191 | { |
192 | struct shrinker *shrinker; | 192 | struct shrinker *shrinker; |
@@ -926,7 +926,7 @@ shrink_caches(struct zone **zones, struct scan_control *sc) | |||
926 | * holds filesystem locks which prevent writeout this might not work, and the | 926 | * holds filesystem locks which prevent writeout this might not work, and the |
927 | * allocation attempt will fail. | 927 | * allocation attempt will fail. |
928 | */ | 928 | */ |
929 | int try_to_free_pages(struct zone **zones, unsigned int gfp_mask) | 929 | int try_to_free_pages(struct zone **zones, gfp_t gfp_mask) |
930 | { | 930 | { |
931 | int priority; | 931 | int priority; |
932 | int ret = 0; | 932 | int ret = 0; |
@@ -1338,7 +1338,7 @@ module_init(kswapd_init) | |||
1338 | /* | 1338 | /* |
1339 | * Try to free up some pages from this zone through reclaim. | 1339 | * Try to free up some pages from this zone through reclaim. |
1340 | */ | 1340 | */ |
1341 | int zone_reclaim(struct zone *zone, unsigned int gfp_mask, unsigned int order) | 1341 | int zone_reclaim(struct zone *zone, gfp_t gfp_mask, unsigned int order) |
1342 | { | 1342 | { |
1343 | struct scan_control sc; | 1343 | struct scan_control sc; |
1344 | int nr_pages = 1 << order; | 1344 | int nr_pages = 1 << order; |