The filesystem turns to readonly instead of BUG_ON() when 
free_log_tree fails.

Signed-off-by: Tsutomu Itoh <[email protected]>
---
 fs/btrfs/tree-log.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index f4d81c0..44bcfba 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -2171,7 +2171,10 @@ static void free_log_tree(struct btrfs_trans_handle 
*trans,
        };
 
        ret = walk_log_tree(trans, log, &wc);
-       BUG_ON(ret);
+       if (ret) {
+               btrfs_std_error(log->fs_info, ret);
+               return;
+       }
 
        while (1) {
                ret = find_first_extent_bit(&log->dirty_log_pages,

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to