diff options
-rw-r--r-- | arch/arm26/mm/small_page.c | 6 | ||||
-rw-r--r-- | fs/afs/file.c | 3 | ||||
-rw-r--r-- | fs/buffer.c | 3 | ||||
-rw-r--r-- | fs/jffs2/file.c | 3 | ||||
-rw-r--r-- | fs/udf/file.c | 6 | ||||
-rw-r--r-- | fs/udf/inode.c | 4 | ||||
-rw-r--r-- | include/asm-cris/page.h | 4 | ||||
-rw-r--r-- | include/asm-generic/bug.h | 11 | ||||
-rw-r--r-- | include/asm-sh64/bug.h | 4 | ||||
-rw-r--r-- | mm/filemap.c | 3 |
10 files changed, 10 insertions, 37 deletions
diff --git a/arch/arm26/mm/small_page.c b/arch/arm26/mm/small_page.c index 77be86cca789..30447106c25f 100644 --- a/arch/arm26/mm/small_page.c +++ b/arch/arm26/mm/small_page.c | |||
@@ -92,8 +92,7 @@ static unsigned long __get_small_page(int priority, struct order *order) | |||
92 | page = list_entry(order->queue.next, struct page, lru); | 92 | page = list_entry(order->queue.next, struct page, lru); |
93 | again: | 93 | again: |
94 | #ifdef PEDANTIC | 94 | #ifdef PEDANTIC |
95 | if (USED_MAP(page) & ~order->all_used) | 95 | BUG_ON(USED_MAP(page) & ~order->all_used); |
96 | PAGE_BUG(page); | ||
97 | #endif | 96 | #endif |
98 | offset = ffz(USED_MAP(page)); | 97 | offset = ffz(USED_MAP(page)); |
99 | SET_USED(page, offset); | 98 | SET_USED(page, offset); |
@@ -141,8 +140,7 @@ static void __free_small_page(unsigned long spage, struct order *order) | |||
141 | goto non_small; | 140 | goto non_small; |
142 | 141 | ||
143 | #ifdef PEDANTIC | 142 | #ifdef PEDANTIC |
144 | if (USED_MAP(page) & ~order->all_used) | 143 | BUG_ON(USED_MAP(page) & ~order->all_used); |
145 | PAGE_BUG(page); | ||
146 | #endif | 144 | #endif |
147 | 145 | ||
148 | spage = spage >> order->shift; | 146 | spage = spage >> order->shift; |
diff --git a/fs/afs/file.c b/fs/afs/file.c index 6b6bb7c8abf6..23c125128024 100644 --- a/fs/afs/file.c +++ b/fs/afs/file.c | |||
@@ -131,8 +131,7 @@ static int afs_file_readpage(struct file *file, struct page *page) | |||
131 | 131 | ||
132 | vnode = AFS_FS_I(inode); | 132 | vnode = AFS_FS_I(inode); |
133 | 133 | ||
134 | if (!PageLocked(page)) | 134 | BUG_ON(!PageLocked(page)); |
135 | PAGE_BUG(page); | ||
136 | 135 | ||
137 | ret = -ESTALE; | 136 | ret = -ESTALE; |
138 | if (vnode->flags & AFS_VNODE_DELETED) | 137 | if (vnode->flags & AFS_VNODE_DELETED) |
diff --git a/fs/buffer.c b/fs/buffer.c index 188365c79204..792cbacbbf41 100644 --- a/fs/buffer.c +++ b/fs/buffer.c | |||
@@ -2078,8 +2078,7 @@ int block_read_full_page(struct page *page, get_block_t *get_block) | |||
2078 | int nr, i; | 2078 | int nr, i; |
2079 | int fully_mapped = 1; | 2079 | int fully_mapped = 1; |
2080 | 2080 | ||
2081 | if (!PageLocked(page)) | 2081 | BUG_ON(!PageLocked(page)); |
2082 | PAGE_BUG(page); | ||
2083 | blocksize = 1 << inode->i_blkbits; | 2082 | blocksize = 1 << inode->i_blkbits; |
2084 | if (!page_has_buffers(page)) | 2083 | if (!page_has_buffers(page)) |
2085 | create_empty_buffers(page, blocksize, 0); | 2084 | create_empty_buffers(page, blocksize, 0); |
diff --git a/fs/jffs2/file.c b/fs/jffs2/file.c index 0c607c1388f4..771a554701d6 100644 --- a/fs/jffs2/file.c +++ b/fs/jffs2/file.c | |||
@@ -79,8 +79,7 @@ static int jffs2_do_readpage_nolock (struct inode *inode, struct page *pg) | |||
79 | 79 | ||
80 | D2(printk(KERN_DEBUG "jffs2_do_readpage_nolock(): ino #%lu, page at offset 0x%lx\n", inode->i_ino, pg->index << PAGE_CACHE_SHIFT)); | 80 | D2(printk(KERN_DEBUG "jffs2_do_readpage_nolock(): ino #%lu, page at offset 0x%lx\n", inode->i_ino, pg->index << PAGE_CACHE_SHIFT)); |
81 | 81 | ||
82 | if (!PageLocked(pg)) | 82 | BUG_ON(!PageLocked(pg)); |
83 | PAGE_BUG(pg); | ||
84 | 83 | ||
85 | pg_buf = kmap(pg); | 84 | pg_buf = kmap(pg); |
86 | /* FIXME: Can kmap fail? */ | 85 | /* FIXME: Can kmap fail? */ |
diff --git a/fs/udf/file.c b/fs/udf/file.c index 2faa4172b9f7..bb40d63f328f 100644 --- a/fs/udf/file.c +++ b/fs/udf/file.c | |||
@@ -49,8 +49,7 @@ static int udf_adinicb_readpage(struct file *file, struct page * page) | |||
49 | struct inode *inode = page->mapping->host; | 49 | struct inode *inode = page->mapping->host; |
50 | char *kaddr; | 50 | char *kaddr; |
51 | 51 | ||
52 | if (!PageLocked(page)) | 52 | BUG_ON(!PageLocked(page)); |
53 | PAGE_BUG(page); | ||
54 | 53 | ||
55 | kaddr = kmap(page); | 54 | kaddr = kmap(page); |
56 | memset(kaddr, 0, PAGE_CACHE_SIZE); | 55 | memset(kaddr, 0, PAGE_CACHE_SIZE); |
@@ -67,8 +66,7 @@ static int udf_adinicb_writepage(struct page *page, struct writeback_control *wb | |||
67 | struct inode *inode = page->mapping->host; | 66 | struct inode *inode = page->mapping->host; |
68 | char *kaddr; | 67 | char *kaddr; |
69 | 68 | ||
70 | if (!PageLocked(page)) | 69 | BUG_ON(!PageLocked(page)); |
71 | PAGE_BUG(page); | ||
72 | 70 | ||
73 | kaddr = kmap(page); | 71 | kaddr = kmap(page); |
74 | memcpy(UDF_I_DATA(inode) + UDF_I_LENEATTR(inode), kaddr, inode->i_size); | 72 | memcpy(UDF_I_DATA(inode) + UDF_I_LENEATTR(inode), kaddr, inode->i_size); |
diff --git a/fs/udf/inode.c b/fs/udf/inode.c index 0506e1173784..3d68de39fad6 100644 --- a/fs/udf/inode.c +++ b/fs/udf/inode.c | |||
@@ -167,8 +167,8 @@ void udf_expand_file_adinicb(struct inode * inode, int newsize, int * err) | |||
167 | } | 167 | } |
168 | 168 | ||
169 | page = grab_cache_page(inode->i_mapping, 0); | 169 | page = grab_cache_page(inode->i_mapping, 0); |
170 | if (!PageLocked(page)) | 170 | BUG_ON(!PageLocked(page)); |
171 | PAGE_BUG(page); | 171 | |
172 | if (!PageUptodate(page)) | 172 | if (!PageUptodate(page)) |
173 | { | 173 | { |
174 | kaddr = kmap(page); | 174 | kaddr = kmap(page); |
diff --git a/include/asm-cris/page.h b/include/asm-cris/page.h index ddd8915e41e6..c767da1ef8f5 100644 --- a/include/asm-cris/page.h +++ b/include/asm-cris/page.h | |||
@@ -77,10 +77,6 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
77 | printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \ | 77 | printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \ |
78 | } while (0) | 78 | } while (0) |
79 | 79 | ||
80 | #define PAGE_BUG(page) do { \ | ||
81 | BUG(); \ | ||
82 | } while (0) | ||
83 | |||
84 | /* Pure 2^n version of get_order */ | 80 | /* Pure 2^n version of get_order */ |
85 | static inline int get_order(unsigned long size) | 81 | static inline int get_order(unsigned long size) |
86 | { | 82 | { |
diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h index 6e5aaaa9a2fb..400c2b41896e 100644 --- a/include/asm-generic/bug.h +++ b/include/asm-generic/bug.h | |||
@@ -12,13 +12,6 @@ | |||
12 | } while (0) | 12 | } while (0) |
13 | #endif | 13 | #endif |
14 | 14 | ||
15 | #ifndef HAVE_ARCH_PAGE_BUG | ||
16 | #define PAGE_BUG(page) do { \ | ||
17 | printk("page BUG for page at %p\n", page); \ | ||
18 | BUG(); \ | ||
19 | } while (0) | ||
20 | #endif | ||
21 | |||
22 | #ifndef HAVE_ARCH_BUG_ON | 15 | #ifndef HAVE_ARCH_BUG_ON |
23 | #define BUG_ON(condition) do { if (unlikely((condition)!=0)) BUG(); } while(0) | 16 | #define BUG_ON(condition) do { if (unlikely((condition)!=0)) BUG(); } while(0) |
24 | #endif | 17 | #endif |
@@ -37,10 +30,6 @@ | |||
37 | #define BUG() | 30 | #define BUG() |
38 | #endif | 31 | #endif |
39 | 32 | ||
40 | #ifndef HAVE_ARCH_PAGE_BUG | ||
41 | #define PAGE_BUG(page) do { if (page) ; } while (0) | ||
42 | #endif | ||
43 | |||
44 | #ifndef HAVE_ARCH_BUG_ON | 33 | #ifndef HAVE_ARCH_BUG_ON |
45 | #define BUG_ON(condition) do { if (condition) ; } while(0) | 34 | #define BUG_ON(condition) do { if (condition) ; } while(0) |
46 | #endif | 35 | #endif |
diff --git a/include/asm-sh64/bug.h b/include/asm-sh64/bug.h index 3acd54d59566..5d659ec28e10 100644 --- a/include/asm-sh64/bug.h +++ b/include/asm-sh64/bug.h | |||
@@ -17,10 +17,6 @@ | |||
17 | BUG(); \ | 17 | BUG(); \ |
18 | } while(0) | 18 | } while(0) |
19 | 19 | ||
20 | #define PAGE_BUG(page) do { \ | ||
21 | BUG(); \ | ||
22 | } while (0) | ||
23 | |||
24 | #define WARN_ON(condition) do { \ | 20 | #define WARN_ON(condition) do { \ |
25 | if (unlikely((condition)!=0)) { \ | 21 | if (unlikely((condition)!=0)) { \ |
26 | printk("Badness in %s at %s:%d\n", __FUNCTION__, __FILE__, __LINE__); \ | 22 | printk("Badness in %s at %s:%d\n", __FUNCTION__, __FILE__, __LINE__); \ |
diff --git a/mm/filemap.c b/mm/filemap.c index ee79b5d3439f..c085af2332d8 100644 --- a/mm/filemap.c +++ b/mm/filemap.c | |||
@@ -123,8 +123,7 @@ void remove_from_page_cache(struct page *page) | |||
123 | { | 123 | { |
124 | struct address_space *mapping = page->mapping; | 124 | struct address_space *mapping = page->mapping; |
125 | 125 | ||
126 | if (unlikely(!PageLocked(page))) | 126 | BUG_ON(!PageLocked(page)); |
127 | PAGE_BUG(page); | ||
128 | 127 | ||
129 | write_lock_irq(&mapping->tree_lock); | 128 | write_lock_irq(&mapping->tree_lock); |
130 | __remove_from_page_cache(page); | 129 | __remove_from_page_cache(page); |