This BUG() has been triggered by a fuzz testing image, but in fact btrfs can handle this gracefully by returning -EIO.
Thus, use WARN_ONCE for warning purpose and don't leave a possible kernel panic. Signed-off-by: Liu Bo <bo.li....@oracle.com> --- fs/btrfs/raid56.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/raid56.c b/fs/btrfs/raid56.c index 0b7792e..863f7fe 100644 --- a/fs/btrfs/raid56.c +++ b/fs/btrfs/raid56.c @@ -2139,7 +2139,7 @@ int raid56_parity_recover(struct btrfs_root *root, struct bio *bio, rbio->faila = find_logical_bio_stripe(rbio, bio); if (rbio->faila == -1) { - BUG(); + WARN_ONCE(1, KERN_WARNING "rbio->faila is -1\n"); if (generic_io) btrfs_put_bbio(bbio); kfree(rbio); -- 2.5.5 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html