diff options
-rw-r--r-- | fs/ext3/balloc.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/fs/ext3/balloc.c b/fs/ext3/balloc.c index e6b983707008..2bd836f30ca6 100644 --- a/fs/ext3/balloc.c +++ b/fs/ext3/balloc.c | |||
@@ -111,7 +111,7 @@ error_out: | |||
111 | * we could easily switch to that without changing too much | 111 | * we could easily switch to that without changing too much |
112 | * code. | 112 | * code. |
113 | */ | 113 | */ |
114 | #if 0 | 114 | #if 1 |
115 | static void __rsv_window_dump(struct rb_root *root, int verbose, | 115 | static void __rsv_window_dump(struct rb_root *root, int verbose, |
116 | const char *fn) | 116 | const char *fn) |
117 | { | 117 | { |
@@ -129,7 +129,7 @@ restart: | |||
129 | rsv = list_entry(n, struct ext3_reserve_window_node, rsv_node); | 129 | rsv = list_entry(n, struct ext3_reserve_window_node, rsv_node); |
130 | if (verbose) | 130 | if (verbose) |
131 | printk("reservation window 0x%p " | 131 | printk("reservation window 0x%p " |
132 | "start: %d, end: %d\n", | 132 | "start: %lu, end: %lu\n", |
133 | rsv, rsv->rsv_start, rsv->rsv_end); | 133 | rsv, rsv->rsv_start, rsv->rsv_end); |
134 | if (rsv->rsv_start && rsv->rsv_start >= rsv->rsv_end) { | 134 | if (rsv->rsv_start && rsv->rsv_start >= rsv->rsv_end) { |
135 | printk("Bad reservation %p (start >= end)\n", | 135 | printk("Bad reservation %p (start >= end)\n", |
@@ -236,8 +236,10 @@ void ext3_rsv_window_add(struct super_block *sb, | |||
236 | p = &(*p)->rb_left; | 236 | p = &(*p)->rb_left; |
237 | else if (start > this->rsv_end) | 237 | else if (start > this->rsv_end) |
238 | p = &(*p)->rb_right; | 238 | p = &(*p)->rb_right; |
239 | else | 239 | else { |
240 | rsv_window_dump(root, 1); | ||
240 | BUG(); | 241 | BUG(); |
242 | } | ||
241 | } | 243 | } |
242 | 244 | ||
243 | rb_link_node(node, parent, p); | 245 | rb_link_node(node, parent, p); |
@@ -1133,8 +1135,10 @@ ext3_try_to_allocate_with_rsv(struct super_block *sb, handle_t *handle, | |||
1133 | *count-my_rsv->rsv_end + grp_goal - 1); | 1135 | *count-my_rsv->rsv_end + grp_goal - 1); |
1134 | 1136 | ||
1135 | if ((my_rsv->rsv_start >= group_first_block + EXT3_BLOCKS_PER_GROUP(sb)) | 1137 | if ((my_rsv->rsv_start >= group_first_block + EXT3_BLOCKS_PER_GROUP(sb)) |
1136 | || (my_rsv->rsv_end < group_first_block)) | 1138 | || (my_rsv->rsv_end < group_first_block)) { |
1139 | rsv_window_dump(&EXT3_SB(sb)->s_rsv_window_root, 1); | ||
1137 | BUG(); | 1140 | BUG(); |
1141 | } | ||
1138 | ret = ext3_try_to_allocate(sb, handle, group, bitmap_bh, grp_goal, | 1142 | ret = ext3_try_to_allocate(sb, handle, group, bitmap_bh, grp_goal, |
1139 | &num, &my_rsv->rsv_window); | 1143 | &num, &my_rsv->rsv_window); |
1140 | if (ret >= 0) { | 1144 | if (ret >= 0) { |