diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/direct-io.c | 3 | ||||
-rw-r--r-- | fs/exec.c | 2 | ||||
-rw-r--r-- | fs/hfsplus/bnode.c | 6 | ||||
-rw-r--r-- | fs/hfsplus/btree.c | 3 | ||||
-rw-r--r-- | fs/jffs2/background.c | 3 | ||||
-rw-r--r-- | fs/smbfs/file.c | 6 | ||||
-rw-r--r-- | fs/sysfs/inode.c | 3 |
7 files changed, 9 insertions, 17 deletions
diff --git a/fs/direct-io.c b/fs/direct-io.c index 910a8ed74b5d..b05d1b218776 100644 --- a/fs/direct-io.c +++ b/fs/direct-io.c | |||
@@ -929,8 +929,7 @@ do_holes: | |||
929 | block_in_page += this_chunk_blocks; | 929 | block_in_page += this_chunk_blocks; |
930 | dio->blocks_available -= this_chunk_blocks; | 930 | dio->blocks_available -= this_chunk_blocks; |
931 | next_block: | 931 | next_block: |
932 | if (dio->block_in_file > dio->final_block_in_request) | 932 | BUG_ON(dio->block_in_file > dio->final_block_in_request); |
933 | BUG(); | ||
934 | if (dio->block_in_file == dio->final_block_in_request) | 933 | if (dio->block_in_file == dio->final_block_in_request) |
935 | break; | 934 | break; |
936 | } | 935 | } |
@@ -561,7 +561,7 @@ static int exec_mmap(struct mm_struct *mm) | |||
561 | arch_pick_mmap_layout(mm); | 561 | arch_pick_mmap_layout(mm); |
562 | if (old_mm) { | 562 | if (old_mm) { |
563 | up_read(&old_mm->mmap_sem); | 563 | up_read(&old_mm->mmap_sem); |
564 | if (active_mm != old_mm) BUG(); | 564 | BUG_ON(active_mm != old_mm); |
565 | mmput(old_mm); | 565 | mmput(old_mm); |
566 | return 0; | 566 | return 0; |
567 | } | 567 | } |
diff --git a/fs/hfsplus/bnode.c b/fs/hfsplus/bnode.c index 8f07e8fbd03d..746abc9ecf70 100644 --- a/fs/hfsplus/bnode.c +++ b/fs/hfsplus/bnode.c | |||
@@ -466,8 +466,7 @@ void hfs_bnode_unhash(struct hfs_bnode *node) | |||
466 | for (p = &node->tree->node_hash[hfs_bnode_hash(node->this)]; | 466 | for (p = &node->tree->node_hash[hfs_bnode_hash(node->this)]; |
467 | *p && *p != node; p = &(*p)->next_hash) | 467 | *p && *p != node; p = &(*p)->next_hash) |
468 | ; | 468 | ; |
469 | if (!*p) | 469 | BUG_ON(!*p); |
470 | BUG(); | ||
471 | *p = node->next_hash; | 470 | *p = node->next_hash; |
472 | node->tree->node_hash_cnt--; | 471 | node->tree->node_hash_cnt--; |
473 | } | 472 | } |
@@ -622,8 +621,7 @@ void hfs_bnode_put(struct hfs_bnode *node) | |||
622 | 621 | ||
623 | dprint(DBG_BNODE_REFS, "put_node(%d:%d): %d\n", | 622 | dprint(DBG_BNODE_REFS, "put_node(%d:%d): %d\n", |
624 | node->tree->cnid, node->this, atomic_read(&node->refcnt)); | 623 | node->tree->cnid, node->this, atomic_read(&node->refcnt)); |
625 | if (!atomic_read(&node->refcnt)) | 624 | BUG_ON(!atomic_read(&node->refcnt)); |
626 | BUG(); | ||
627 | if (!atomic_dec_and_lock(&node->refcnt, &tree->hash_lock)) | 625 | if (!atomic_dec_and_lock(&node->refcnt, &tree->hash_lock)) |
628 | return; | 626 | return; |
629 | for (i = 0; i < tree->pages_per_bnode; i++) { | 627 | for (i = 0; i < tree->pages_per_bnode; i++) { |
diff --git a/fs/hfsplus/btree.c b/fs/hfsplus/btree.c index a67edfa34e9e..effa8991999c 100644 --- a/fs/hfsplus/btree.c +++ b/fs/hfsplus/btree.c | |||
@@ -269,8 +269,7 @@ void hfs_bmap_free(struct hfs_bnode *node) | |||
269 | u8 *data, byte, m; | 269 | u8 *data, byte, m; |
270 | 270 | ||
271 | dprint(DBG_BNODE_MOD, "btree_free_node: %u\n", node->this); | 271 | dprint(DBG_BNODE_MOD, "btree_free_node: %u\n", node->this); |
272 | if (!node->this) | 272 | BUG_ON(!node->this); |
273 | BUG(); | ||
274 | tree = node->tree; | 273 | tree = node->tree; |
275 | nidx = node->this; | 274 | nidx = node->this; |
276 | node = hfs_bnode_find(tree, 0); | 275 | node = hfs_bnode_find(tree, 0); |
diff --git a/fs/jffs2/background.c b/fs/jffs2/background.c index 7b77a9541125..ff2a872e80e7 100644 --- a/fs/jffs2/background.c +++ b/fs/jffs2/background.c | |||
@@ -35,8 +35,7 @@ int jffs2_start_garbage_collect_thread(struct jffs2_sb_info *c) | |||
35 | pid_t pid; | 35 | pid_t pid; |
36 | int ret = 0; | 36 | int ret = 0; |
37 | 37 | ||
38 | if (c->gc_task) | 38 | BUG_ON(c->gc_task); |
39 | BUG(); | ||
40 | 39 | ||
41 | init_completion(&c->gc_thread_start); | 40 | init_completion(&c->gc_thread_start); |
42 | init_completion(&c->gc_thread_exit); | 41 | init_completion(&c->gc_thread_exit); |
diff --git a/fs/smbfs/file.c b/fs/smbfs/file.c index c56bd99a9701..ed9a24d19d7d 100644 --- a/fs/smbfs/file.c +++ b/fs/smbfs/file.c | |||
@@ -178,11 +178,9 @@ smb_writepage(struct page *page, struct writeback_control *wbc) | |||
178 | unsigned offset = PAGE_CACHE_SIZE; | 178 | unsigned offset = PAGE_CACHE_SIZE; |
179 | int err; | 179 | int err; |
180 | 180 | ||
181 | if (!mapping) | 181 | BUG_ON(!mapping); |
182 | BUG(); | ||
183 | inode = mapping->host; | 182 | inode = mapping->host; |
184 | if (!inode) | 183 | BUG_ON(!inode); |
185 | BUG(); | ||
186 | 184 | ||
187 | end_index = inode->i_size >> PAGE_CACHE_SHIFT; | 185 | end_index = inode->i_size >> PAGE_CACHE_SHIFT; |
188 | 186 | ||
diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c index 4c29ac41ac3e..f0b347bd12ca 100644 --- a/fs/sysfs/inode.c +++ b/fs/sysfs/inode.c | |||
@@ -175,8 +175,7 @@ const unsigned char * sysfs_get_name(struct sysfs_dirent *sd) | |||
175 | struct bin_attribute * bin_attr; | 175 | struct bin_attribute * bin_attr; |
176 | struct sysfs_symlink * sl; | 176 | struct sysfs_symlink * sl; |
177 | 177 | ||
178 | if (!sd || !sd->s_element) | 178 | BUG_ON(!sd || !sd->s_element); |
179 | BUG(); | ||
180 | 179 | ||
181 | switch (sd->s_type) { | 180 | switch (sd->s_type) { |
182 | case SYSFS_DIR: | 181 | case SYSFS_DIR: |