Tsutomu Itoh
2011-Dec-01 10:09 UTC
[PATCH] Btrfs: forced readonly when free_log_tree fails
The filesystem turns to readonly instead of BUG_ON() when
free_log_tree fails.
Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
---
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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html