aboutsummaryrefslogtreecommitdiffstats
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
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>
-rw-r--r--fs/afs/file.c4
-rw-r--r--fs/bio.c4
-rw-r--r--fs/buffer.c2
-rw-r--r--fs/dcache.c2
-rw-r--r--fs/dquot.c2
-rw-r--r--fs/ext3/inode.c2
-rw-r--r--fs/hfs/inode.c2
-rw-r--r--fs/hfsplus/inode.c2
-rw-r--r--fs/inode.c2
-rw-r--r--fs/jbd/journal.c2
-rw-r--r--fs/jbd/transaction.c2
-rw-r--r--fs/jfs/jfs_metapage.c4
-rw-r--r--fs/mbcache.c6
-rw-r--r--fs/reiserfs/fix_node.c2
-rw-r--r--fs/reiserfs/inode.c2
-rw-r--r--fs/xfs/linux-2.6/kmem.c22
-rw-r--r--fs/xfs/linux-2.6/kmem.h18
-rw-r--r--fs/xfs/linux-2.6/xfs_aops.c2
-rw-r--r--fs/xfs/linux-2.6/xfs_buf.c8
-rw-r--r--include/linux/bio.h2
-rw-r--r--include/linux/buffer_head.h2
-rw-r--r--include/linux/fs.h2
-rw-r--r--include/linux/jbd.h4
-rw-r--r--include/linux/mbcache.h2
-rw-r--r--include/linux/reiserfs_fs.h2
25 files changed, 52 insertions, 52 deletions
diff --git a/fs/afs/file.c b/fs/afs/file.c
index 23c125128024..0d576987ec67 100644
--- a/fs/afs/file.c
+++ b/fs/afs/file.c
@@ -29,7 +29,7 @@ static int afs_file_release(struct inode *inode, struct file *file);
29 29
30static int afs_file_readpage(struct file *file, struct page *page); 30static int afs_file_readpage(struct file *file, struct page *page);
31static int afs_file_invalidatepage(struct page *page, unsigned long offset); 31static int afs_file_invalidatepage(struct page *page, unsigned long offset);
32static int afs_file_releasepage(struct page *page, int gfp_flags); 32static int afs_file_releasepage(struct page *page, gfp_t gfp_flags);
33 33
34static ssize_t afs_file_write(struct file *file, const char __user *buf, 34static ssize_t afs_file_write(struct file *file, const char __user *buf,
35 size_t size, loff_t *off); 35 size_t size, loff_t *off);
@@ -279,7 +279,7 @@ static int afs_file_invalidatepage(struct page *page, unsigned long offset)
279/* 279/*
280 * release a page and cleanup its private data 280 * release a page and cleanup its private data
281 */ 281 */
282static int afs_file_releasepage(struct page *page, int gfp_flags) 282static int afs_file_releasepage(struct page *page, gfp_t gfp_flags)
283{ 283{
284 struct cachefs_page *pageio; 284 struct cachefs_page *pageio;
285 285
diff --git a/fs/bio.c b/fs/bio.c
index 7d81a93afd48..460554b07ff9 100644
--- a/fs/bio.c
+++ b/fs/bio.c
@@ -778,7 +778,7 @@ static int bio_map_kern_endio(struct bio *bio, unsigned int bytes_done, int err)
778 778
779 779
780static struct bio *__bio_map_kern(request_queue_t *q, void *data, 780static struct bio *__bio_map_kern(request_queue_t *q, void *data,
781 unsigned int len, unsigned int gfp_mask) 781 unsigned int len, gfp_t gfp_mask)
782{ 782{
783 unsigned long kaddr = (unsigned long)data; 783 unsigned long kaddr = (unsigned long)data;
784 unsigned long end = (kaddr + len + PAGE_SIZE - 1) >> PAGE_SHIFT; 784 unsigned long end = (kaddr + len + PAGE_SIZE - 1) >> PAGE_SHIFT;
@@ -825,7 +825,7 @@ static struct bio *__bio_map_kern(request_queue_t *q, void *data,
825 * device. Returns an error pointer in case of error. 825 * device. Returns an error pointer in case of error.
826 */ 826 */
827struct bio *bio_map_kern(request_queue_t *q, void *data, unsigned int len, 827struct bio *bio_map_kern(request_queue_t *q, void *data, unsigned int len,
828 unsigned int gfp_mask) 828 gfp_t gfp_mask)
829{ 829{
830 struct bio *bio; 830 struct bio *bio;
831 831
diff --git a/fs/buffer.c b/fs/buffer.c
index 9657696fd6d7..b1667986442f 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -1571,7 +1571,7 @@ static inline void discard_buffer(struct buffer_head * bh)
1571 * 1571 *
1572 * NOTE: @gfp_mask may go away, and this function may become non-blocking. 1572 * NOTE: @gfp_mask may go away, and this function may become non-blocking.
1573 */ 1573 */
1574int try_to_release_page(struct page *page, int gfp_mask) 1574int try_to_release_page(struct page *page, gfp_t gfp_mask)
1575{ 1575{
1576 struct address_space * const mapping = page->mapping; 1576 struct address_space * const mapping = page->mapping;
1577 1577
diff --git a/fs/dcache.c b/fs/dcache.c
index fb10386c59be..e90512ed35a4 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -689,7 +689,7 @@ void shrink_dcache_anon(struct hlist_head *head)
689 * 689 *
690 * In this case we return -1 to tell the caller that we baled. 690 * In this case we return -1 to tell the caller that we baled.
691 */ 691 */
692static int shrink_dcache_memory(int nr, unsigned int gfp_mask) 692static int shrink_dcache_memory(int nr, gfp_t gfp_mask)
693{ 693{
694 if (nr) { 694 if (nr) {
695 if (!(gfp_mask & __GFP_FS)) 695 if (!(gfp_mask & __GFP_FS))
diff --git a/fs/dquot.c b/fs/dquot.c
index b9732335bcdc..05f3327d64a3 100644
--- a/fs/dquot.c
+++ b/fs/dquot.c
@@ -500,7 +500,7 @@ static void prune_dqcache(int count)
500 * more memory 500 * more memory
501 */ 501 */
502 502
503static int shrink_dqcache_memory(int nr, unsigned int gfp_mask) 503static int shrink_dqcache_memory(int nr, gfp_t gfp_mask)
504{ 504{
505 if (nr) { 505 if (nr) {
506 spin_lock(&dq_list_lock); 506 spin_lock(&dq_list_lock);
diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c
index b5177c90d6f1..8b38f2232796 100644
--- a/fs/ext3/inode.c
+++ b/fs/ext3/inode.c
@@ -1434,7 +1434,7 @@ static int ext3_invalidatepage(struct page *page, unsigned long offset)
1434 return journal_invalidatepage(journal, page, offset); 1434 return journal_invalidatepage(journal, page, offset);
1435} 1435}
1436 1436
1437static int ext3_releasepage(struct page *page, int wait) 1437static int ext3_releasepage(struct page *page, gfp_t wait)
1438{ 1438{
1439 journal_t *journal = EXT3_JOURNAL(page->mapping->host); 1439 journal_t *journal = EXT3_JOURNAL(page->mapping->host);
1440 1440
diff --git a/fs/hfs/inode.c b/fs/hfs/inode.c
index f1570b9f9de3..3f680c5675bf 100644
--- a/fs/hfs/inode.c
+++ b/fs/hfs/inode.c
@@ -46,7 +46,7 @@ static sector_t hfs_bmap(struct address_space *mapping, sector_t block)
46 return generic_block_bmap(mapping, block, hfs_get_block); 46 return generic_block_bmap(mapping, block, hfs_get_block);
47} 47}
48 48
49static int hfs_releasepage(struct page *page, int mask) 49static int hfs_releasepage(struct page *page, gfp_t mask)
50{ 50{
51 struct inode *inode = page->mapping->host; 51 struct inode *inode = page->mapping->host;
52 struct super_block *sb = inode->i_sb; 52 struct super_block *sb = inode->i_sb;
diff --git a/fs/hfsplus/inode.c b/fs/hfsplus/inode.c
index d5642705f633..f205773ddfbe 100644
--- a/fs/hfsplus/inode.c
+++ b/fs/hfsplus/inode.c
@@ -40,7 +40,7 @@ static sector_t hfsplus_bmap(struct address_space *mapping, sector_t block)
40 return generic_block_bmap(mapping, block, hfsplus_get_block); 40 return generic_block_bmap(mapping, block, hfsplus_get_block);
41} 41}
42 42
43static int hfsplus_releasepage(struct page *page, int mask) 43static int hfsplus_releasepage(struct page *page, gfp_t mask)
44{ 44{
45 struct inode *inode = page->mapping->host; 45 struct inode *inode = page->mapping->host;
46 struct super_block *sb = inode->i_sb; 46 struct super_block *sb = inode->i_sb;
diff --git a/fs/inode.c b/fs/inode.c
index f80a79ff156b..7d3316527767 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -475,7 +475,7 @@ static void prune_icache(int nr_to_scan)
475 * This function is passed the number of inodes to scan, and it returns the 475 * This function is passed the number of inodes to scan, and it returns the
476 * total number of remaining possibly-reclaimable inodes. 476 * total number of remaining possibly-reclaimable inodes.
477 */ 477 */
478static int shrink_icache_memory(int nr, unsigned int gfp_mask) 478static int shrink_icache_memory(int nr, gfp_t gfp_mask)
479{ 479{
480 if (nr) { 480 if (nr) {
481 /* 481 /*
diff --git a/fs/jbd/journal.c b/fs/jbd/journal.c
index 7ae2c4fe506b..e4b516ac4989 100644
--- a/fs/jbd/journal.c
+++ b/fs/jbd/journal.c
@@ -1606,7 +1606,7 @@ int journal_blocks_per_page(struct inode *inode)
1606 * Simple support for retrying memory allocations. Introduced to help to 1606 * Simple support for retrying memory allocations. Introduced to help to
1607 * debug different VM deadlock avoidance strategies. 1607 * debug different VM deadlock avoidance strategies.
1608 */ 1608 */
1609void * __jbd_kmalloc (const char *where, size_t size, int flags, int retry) 1609void * __jbd_kmalloc (const char *where, size_t size, gfp_t flags, int retry)
1610{ 1610{
1611 return kmalloc(size, flags | (retry ? __GFP_NOFAIL : 0)); 1611 return kmalloc(size, flags | (retry ? __GFP_NOFAIL : 0));
1612} 1612}
diff --git a/fs/jbd/transaction.c b/fs/jbd/transaction.c
index 49bbc2be3d72..13cb05bf6048 100644
--- a/fs/jbd/transaction.c
+++ b/fs/jbd/transaction.c
@@ -1621,7 +1621,7 @@ out:
1621 * while the data is part of a transaction. Yes? 1621 * while the data is part of a transaction. Yes?
1622 */ 1622 */
1623int journal_try_to_free_buffers(journal_t *journal, 1623int journal_try_to_free_buffers(journal_t *journal,
1624 struct page *page, int unused_gfp_mask) 1624 struct page *page, gfp_t unused_gfp_mask)
1625{ 1625{
1626 struct buffer_head *head; 1626 struct buffer_head *head;
1627 struct buffer_head *bh; 1627 struct buffer_head *bh;
diff --git a/fs/jfs/jfs_metapage.c b/fs/jfs/jfs_metapage.c
index 13d7e3f1feb4..eeb37d70e650 100644
--- a/fs/jfs/jfs_metapage.c
+++ b/fs/jfs/jfs_metapage.c
@@ -198,7 +198,7 @@ static void init_once(void *foo, kmem_cache_t *cachep, unsigned long flags)
198 } 198 }
199} 199}
200 200
201static inline struct metapage *alloc_metapage(unsigned int gfp_mask) 201static inline struct metapage *alloc_metapage(gfp_t gfp_mask)
202{ 202{
203 return mempool_alloc(metapage_mempool, gfp_mask); 203 return mempool_alloc(metapage_mempool, gfp_mask);
204} 204}
@@ -534,7 +534,7 @@ add_failed:
534 return -EIO; 534 return -EIO;
535} 535}
536 536
537static int metapage_releasepage(struct page *page, int gfp_mask) 537static int metapage_releasepage(struct page *page, gfp_t gfp_mask)
538{ 538{
539 struct metapage *mp; 539 struct metapage *mp;
540 int busy = 0; 540 int busy = 0;
diff --git a/fs/mbcache.c b/fs/mbcache.c
index b002a088857d..298997f17475 100644
--- a/fs/mbcache.c
+++ b/fs/mbcache.c
@@ -116,7 +116,7 @@ mb_cache_indexes(struct mb_cache *cache)
116 * What the mbcache registers as to get shrunk dynamically. 116 * What the mbcache registers as to get shrunk dynamically.
117 */ 117 */
118 118
119static int mb_cache_shrink_fn(int nr_to_scan, unsigned int gfp_mask); 119static int mb_cache_shrink_fn(int nr_to_scan, gfp_t gfp_mask);
120 120
121 121
122static inline int 122static inline int
@@ -140,7 +140,7 @@ __mb_cache_entry_unhash(struct mb_cache_entry *ce)
140 140
141 141
142static inline void 142static inline void
143__mb_cache_entry_forget(struct mb_cache_entry *ce, int gfp_mask) 143__mb_cache_entry_forget(struct mb_cache_entry *ce, gfp_t gfp_mask)
144{ 144{
145 struct mb_cache *cache = ce->e_cache; 145 struct mb_cache *cache = ce->e_cache;
146 146
@@ -193,7 +193,7 @@ forget:
193 * Returns the number of objects which are present in the cache. 193 * Returns the number of objects which are present in the cache.
194 */ 194 */
195static int 195static int
196mb_cache_shrink_fn(int nr_to_scan, unsigned int gfp_mask) 196mb_cache_shrink_fn(int nr_to_scan, gfp_t gfp_mask)
197{ 197{
198 LIST_HEAD(free_list); 198 LIST_HEAD(free_list);
199 struct list_head *l, *ltmp; 199 struct list_head *l, *ltmp;
diff --git a/fs/reiserfs/fix_node.c b/fs/reiserfs/fix_node.c
index 2706e2adffab..45829889dcdc 100644
--- a/fs/reiserfs/fix_node.c
+++ b/fs/reiserfs/fix_node.c
@@ -2022,7 +2022,7 @@ static int get_neighbors(struct tree_balance *p_s_tb, int n_h)
2022} 2022}
2023 2023
2024#ifdef CONFIG_REISERFS_CHECK 2024#ifdef CONFIG_REISERFS_CHECK
2025void *reiserfs_kmalloc(size_t size, int flags, struct super_block *s) 2025void *reiserfs_kmalloc(size_t size, gfp_t flags, struct super_block *s)
2026{ 2026{
2027 void *vp; 2027 void *vp;
2028 static size_t malloced; 2028 static size_t malloced;
diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c
index d76ee6c4f9b8..5f82352b97e1 100644
--- a/fs/reiserfs/inode.c
+++ b/fs/reiserfs/inode.c
@@ -2842,7 +2842,7 @@ static int reiserfs_set_page_dirty(struct page *page)
2842 * even in -o notail mode, we can't be sure an old mount without -o notail 2842 * even in -o notail mode, we can't be sure an old mount without -o notail
2843 * didn't create files with tails. 2843 * didn't create files with tails.
2844 */ 2844 */
2845static int reiserfs_releasepage(struct page *page, int unused_gfp_flags) 2845static int reiserfs_releasepage(struct page *page, gfp_t unused_gfp_flags)
2846{ 2846{
2847 struct inode *inode = page->mapping->host; 2847 struct inode *inode = page->mapping->host;
2848 struct reiserfs_journal *j = SB_JOURNAL(inode->i_sb); 2848 struct reiserfs_journal *j = SB_JOURNAL(inode->i_sb);
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
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}
diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c
index c6c077978fe3..7aa398724706 100644
--- a/fs/xfs/linux-2.6/xfs_aops.c
+++ b/fs/xfs/linux-2.6/xfs_aops.c
@@ -1296,7 +1296,7 @@ linvfs_invalidate_page(
1296STATIC int 1296STATIC int
1297linvfs_release_page( 1297linvfs_release_page(
1298 struct page *page, 1298 struct page *page,
1299 int gfp_mask) 1299 gfp_t gfp_mask)
1300{ 1300{
1301 struct inode *inode = page->mapping->host; 1301 struct inode *inode = page->mapping->host;
1302 int dirty, delalloc, unmapped, unwritten; 1302 int dirty, delalloc, unmapped, unwritten;
diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c
index e82cf72ac599..ba4767c04adf 100644
--- a/fs/xfs/linux-2.6/xfs_buf.c
+++ b/fs/xfs/linux-2.6/xfs_buf.c
@@ -64,7 +64,7 @@
64 64
65STATIC kmem_cache_t *pagebuf_zone; 65STATIC kmem_cache_t *pagebuf_zone;
66STATIC kmem_shaker_t pagebuf_shake; 66STATIC kmem_shaker_t pagebuf_shake;
67STATIC int xfsbufd_wakeup(int, unsigned int); 67STATIC int xfsbufd_wakeup(int, gfp_t);
68STATIC void pagebuf_delwri_queue(xfs_buf_t *, int); 68STATIC void pagebuf_delwri_queue(xfs_buf_t *, int);
69 69
70STATIC struct workqueue_struct *xfslogd_workqueue; 70STATIC struct workqueue_struct *xfslogd_workqueue;
@@ -383,7 +383,7 @@ _pagebuf_lookup_pages(
383 size_t blocksize = bp->pb_target->pbr_bsize; 383 size_t blocksize = bp->pb_target->pbr_bsize;
384 size_t size = bp->pb_count_desired; 384 size_t size = bp->pb_count_desired;
385 size_t nbytes, offset; 385 size_t nbytes, offset;
386 int gfp_mask = pb_to_gfp(flags); 386 gfp_t gfp_mask = pb_to_gfp(flags);
387 unsigned short page_count, i; 387 unsigned short page_count, i;
388 pgoff_t first; 388 pgoff_t first;
389 loff_t end; 389 loff_t end;
@@ -1749,8 +1749,8 @@ STATIC int xfsbufd_force_sleep;
1749 1749
1750STATIC int 1750STATIC int
1751xfsbufd_wakeup( 1751xfsbufd_wakeup(
1752 int priority, 1752 int priority,
1753 unsigned int mask) 1753 gfp_t mask)
1754{ 1754{
1755 if (xfsbufd_force_sleep) 1755 if (xfsbufd_force_sleep)
1756 return 0; 1756 return 0;
diff --git a/include/linux/bio.h b/include/linux/bio.h
index 3344b4e8e43a..685fd3720df5 100644
--- a/include/linux/bio.h
+++ b/include/linux/bio.h
@@ -301,7 +301,7 @@ extern struct bio *bio_map_user_iov(struct request_queue *,
301 struct sg_iovec *, int, int); 301 struct sg_iovec *, int, int);
302extern void bio_unmap_user(struct bio *); 302extern void bio_unmap_user(struct bio *);
303extern struct bio *bio_map_kern(struct request_queue *, void *, unsigned int, 303extern struct bio *bio_map_kern(struct request_queue *, void *, unsigned int,
304 unsigned int); 304 gfp_t);
305extern void bio_set_pages_dirty(struct bio *bio); 305extern void bio_set_pages_dirty(struct bio *bio);
306extern void bio_check_pages_dirty(struct bio *bio); 306extern void bio_check_pages_dirty(struct bio *bio);
307extern struct bio *bio_copy_user(struct request_queue *, unsigned long, unsigned int, int); 307extern struct bio *bio_copy_user(struct request_queue *, unsigned long, unsigned int, int);
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h
index 6a1d154c0825..88af42f5e04a 100644
--- a/include/linux/buffer_head.h
+++ b/include/linux/buffer_head.h
@@ -188,7 +188,7 @@ extern int buffer_heads_over_limit;
188 * Generic address_space_operations implementations for buffer_head-backed 188 * Generic address_space_operations implementations for buffer_head-backed
189 * address_spaces. 189 * address_spaces.
190 */ 190 */
191int try_to_release_page(struct page * page, int gfp_mask); 191int try_to_release_page(struct page * page, gfp_t gfp_mask);
192int block_invalidatepage(struct page *page, unsigned long offset); 192int block_invalidatepage(struct page *page, unsigned long offset);
193int block_write_full_page(struct page *page, get_block_t *get_block, 193int block_write_full_page(struct page *page, get_block_t *get_block,
194 struct writeback_control *wbc); 194 struct writeback_control *wbc);
diff --git a/include/linux/fs.h b/include/linux/fs.h
index e0b77c5af9a0..f83d997c5582 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -320,7 +320,7 @@ struct address_space_operations {
320 /* Unfortunately this kludge is needed for FIBMAP. Don't use it */ 320 /* Unfortunately this kludge is needed for FIBMAP. Don't use it */
321 sector_t (*bmap)(struct address_space *, sector_t); 321 sector_t (*bmap)(struct address_space *, sector_t);
322 int (*invalidatepage) (struct page *, unsigned long); 322 int (*invalidatepage) (struct page *, unsigned long);
323 int (*releasepage) (struct page *, int); 323 int (*releasepage) (struct page *, gfp_t);
324 ssize_t (*direct_IO)(int, struct kiocb *, const struct iovec *iov, 324 ssize_t (*direct_IO)(int, struct kiocb *, const struct iovec *iov,
325 loff_t offset, unsigned long nr_segs); 325 loff_t offset, unsigned long nr_segs);
326 struct page* (*get_xip_page)(struct address_space *, sector_t, 326 struct page* (*get_xip_page)(struct address_space *, sector_t,
diff --git a/include/linux/jbd.h b/include/linux/jbd.h
index ff853b3173c6..be197eb90077 100644
--- a/include/linux/jbd.h
+++ b/include/linux/jbd.h
@@ -69,7 +69,7 @@ extern int journal_enable_debug;
69#define jbd_debug(f, a...) /**/ 69#define jbd_debug(f, a...) /**/
70#endif 70#endif
71 71
72extern void * __jbd_kmalloc (const char *where, size_t size, int flags, int retry); 72extern void * __jbd_kmalloc (const char *where, size_t size, gfp_t flags, int retry);
73#define jbd_kmalloc(size, flags) \ 73#define jbd_kmalloc(size, flags) \
74 __jbd_kmalloc(__FUNCTION__, (size), (flags), journal_oom_retry) 74 __jbd_kmalloc(__FUNCTION__, (size), (flags), journal_oom_retry)
75#define jbd_rep_kmalloc(size, flags) \ 75#define jbd_rep_kmalloc(size, flags) \
@@ -890,7 +890,7 @@ extern int journal_forget (handle_t *, struct buffer_head *);
890extern void journal_sync_buffer (struct buffer_head *); 890extern void journal_sync_buffer (struct buffer_head *);
891extern int journal_invalidatepage(journal_t *, 891extern int journal_invalidatepage(journal_t *,
892 struct page *, unsigned long); 892 struct page *, unsigned long);
893extern int journal_try_to_free_buffers(journal_t *, struct page *, int); 893extern int journal_try_to_free_buffers(journal_t *, struct page *, gfp_t);
894extern int journal_stop(handle_t *); 894extern int journal_stop(handle_t *);
895extern int journal_flush (journal_t *); 895extern int journal_flush (journal_t *);
896extern void journal_lock_updates (journal_t *); 896extern void journal_lock_updates (journal_t *);
diff --git a/include/linux/mbcache.h b/include/linux/mbcache.h
index 9263d2db2d67..99e044b4efc6 100644
--- a/include/linux/mbcache.h
+++ b/include/linux/mbcache.h
@@ -22,7 +22,7 @@ struct mb_cache_entry {
22}; 22};
23 23
24struct mb_cache_op { 24struct mb_cache_op {
25 int (*free)(struct mb_cache_entry *, int); 25 int (*free)(struct mb_cache_entry *, gfp_t);
26}; 26};
27 27
28/* Functions on caches */ 28/* Functions on caches */
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h
index af00b10294cd..001ab82df051 100644
--- a/include/linux/reiserfs_fs.h
+++ b/include/linux/reiserfs_fs.h
@@ -1972,7 +1972,7 @@ extern struct address_space_operations reiserfs_address_space_operations;
1972 1972
1973/* fix_nodes.c */ 1973/* fix_nodes.c */
1974#ifdef CONFIG_REISERFS_CHECK 1974#ifdef CONFIG_REISERFS_CHECK
1975void *reiserfs_kmalloc(size_t size, int flags, struct super_block *s); 1975void *reiserfs_kmalloc(size_t size, gfp_t flags, struct super_block *s);
1976void reiserfs_kfree(const void *vp, size_t size, struct super_block *s); 1976void reiserfs_kfree(const void *vp, size_t size, struct super_block *s);
1977#else 1977#else
1978static inline void *reiserfs_kmalloc(size_t size, int flags, 1978static inline void *reiserfs_kmalloc(size_t size, int flags,