This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / fs / jfs / jfs_metapage.c
index 4420ba1..82ffeaa 100644 (file)
@@ -31,7 +31,7 @@
 static spinlock_t meta_lock = SPIN_LOCK_UNLOCKED;
 
 #ifdef CONFIG_JFS_STATISTICS
-static struct {
+struct {
        uint    pagealloc;      /* # of page allocations */
        uint    pagefree;       /* # of page frees */
        uint    lockwait;       /* # of sleeping lock_metapage() calls */
@@ -108,9 +108,9 @@ static void init_once(void *foo, kmem_cache_t *cachep, unsigned long flags)
        }
 }
 
-static inline struct metapage *alloc_metapage(int gfp_mask)
+static inline struct metapage *alloc_metapage(int no_wait)
 {
-       return mempool_alloc(metapage_mempool, gfp_mask);
+       return mempool_alloc(metapage_mempool, no_wait ? GFP_ATOMIC : GFP_NOFS);
 }
 
 static inline void free_metapage(struct metapage *mp)
@@ -289,7 +289,7 @@ again:
                 */
                mp = NULL;
                if (JFS_IP(inode)->fileset == AGGREGATE_I) {
-                       mp = alloc_metapage(GFP_ATOMIC);
+                       mp =  mempool_alloc(metapage_mempool, GFP_ATOMIC);
                        if (!mp) {
                                /*
                                 * mempool is supposed to protect us from
@@ -306,7 +306,7 @@ again:
                        struct metapage *mp2;
 
                        spin_unlock(&meta_lock);
-                       mp = alloc_metapage(GFP_NOFS);
+                       mp =  mempool_alloc(metapage_mempool, GFP_NOFS);
                        spin_lock(&meta_lock);
 
                        /* we dropped the meta_lock, we need to search the