diff options
Diffstat (limited to 'fs/exofs/ore_raid.c')
-rw-r--r-- | fs/exofs/ore_raid.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/exofs/ore_raid.c b/fs/exofs/ore_raid.c index 29c47e5c4a86..414a2dfd9500 100644 --- a/fs/exofs/ore_raid.c +++ b/fs/exofs/ore_raid.c | |||
@@ -551,7 +551,11 @@ int _ore_add_parity_unit(struct ore_io_state *ios, | |||
551 | unsigned cur_len) | 551 | unsigned cur_len) |
552 | { | 552 | { |
553 | if (ios->reading) { | 553 | if (ios->reading) { |
554 | BUG_ON(per_dev->cur_sg >= ios->sgs_per_dev); | 554 | if (per_dev->cur_sg >= ios->sgs_per_dev) { |
555 | ORE_DBGMSG("cur_sg(%d) >= sgs_per_dev(%d)\n" , | ||
556 | per_dev->cur_sg, ios->sgs_per_dev); | ||
557 | return -ENOMEM; | ||
558 | } | ||
555 | _ore_add_sg_seg(per_dev, cur_len, true); | 559 | _ore_add_sg_seg(per_dev, cur_len, true); |
556 | } else { | 560 | } else { |
557 | struct __stripe_pages_2d *sp2d = ios->sp2d; | 561 | struct __stripe_pages_2d *sp2d = ios->sp2d; |