diff options
Diffstat (limited to 'fs/jfs/jfs_metapage.c')
-rw-r--r-- | fs/jfs/jfs_metapage.c | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/fs/jfs/jfs_metapage.c b/fs/jfs/jfs_metapage.c index 0cccd1c39d75..ceaf03b94935 100644 --- a/fs/jfs/jfs_metapage.c +++ b/fs/jfs/jfs_metapage.c | |||
@@ -74,7 +74,7 @@ static inline void lock_metapage(struct metapage *mp) | |||
74 | } | 74 | } |
75 | 75 | ||
76 | #define METAPOOL_MIN_PAGES 32 | 76 | #define METAPOOL_MIN_PAGES 32 |
77 | static kmem_cache_t *metapage_cache; | 77 | static struct kmem_cache *metapage_cache; |
78 | static mempool_t *metapage_mempool; | 78 | static mempool_t *metapage_mempool; |
79 | 79 | ||
80 | #define MPS_PER_PAGE (PAGE_CACHE_SIZE >> L2PSIZE) | 80 | #define MPS_PER_PAGE (PAGE_CACHE_SIZE >> L2PSIZE) |
@@ -180,7 +180,7 @@ static inline void remove_metapage(struct page *page, struct metapage *mp) | |||
180 | 180 | ||
181 | #endif | 181 | #endif |
182 | 182 | ||
183 | static void init_once(void *foo, kmem_cache_t *cachep, unsigned long flags) | 183 | static void init_once(void *foo, struct kmem_cache *cachep, unsigned long flags) |
184 | { | 184 | { |
185 | struct metapage *mp = (struct metapage *)foo; | 185 | struct metapage *mp = (struct metapage *)foo; |
186 | 186 | ||
@@ -764,22 +764,9 @@ void release_metapage(struct metapage * mp) | |||
764 | } else if (mp->lsn) /* discard_metapage doesn't remove it */ | 764 | } else if (mp->lsn) /* discard_metapage doesn't remove it */ |
765 | remove_from_logsync(mp); | 765 | remove_from_logsync(mp); |
766 | 766 | ||
767 | #if MPS_PER_PAGE == 1 | ||
768 | /* | ||
769 | * If we know this is the only thing in the page, we can throw | ||
770 | * the page out of the page cache. If pages are larger, we | ||
771 | * don't want to do this. | ||
772 | */ | ||
773 | |||
774 | /* Retest mp->count since we may have released page lock */ | ||
775 | if (test_bit(META_discard, &mp->flag) && !mp->count) { | ||
776 | clear_page_dirty(page); | ||
777 | ClearPageUptodate(page); | ||
778 | } | ||
779 | #else | ||
780 | /* Try to keep metapages from using up too much memory */ | 767 | /* Try to keep metapages from using up too much memory */ |
781 | drop_metapage(page, mp); | 768 | drop_metapage(page, mp); |
782 | #endif | 769 | |
783 | unlock_page(page); | 770 | unlock_page(page); |
784 | page_cache_release(page); | 771 | page_cache_release(page); |
785 | } | 772 | } |