linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] btrfs-progs: Use clean_tree_block when btrfs_update_root fail
@ 2017-09-06  1:42 Gu Jinxiang
  2017-09-06  1:42 ` [PATCH 2/2] btrfs-progs: Replace some BUG_ON by return Gu Jinxiang
  0 siblings, 1 reply; 3+ messages in thread
From: Gu Jinxiang @ 2017-09-06  1:42 UTC (permalink / raw)
  To: linux-btrfs

In btrfs_fsck_reinit_root, when btrfs_alloc_free_block fail, it will
update on original root.
Before update it, used btrfs_mark_buffer_dirty to set the flag to EXTENT_DIRTY.
So, we should call clean_tree_block to clear the flag if update fail.

Signed-off-by: Gu Jinxiang <gujx@cn.fujitsu.com>
---
 cmds-check.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/cmds-check.c b/cmds-check.c
index 006edbde..6bd55e90 100644
--- a/cmds-check.c
+++ b/cmds-check.c
@@ -11652,6 +11652,7 @@ init:
 		ret = btrfs_update_root(trans, root->fs_info->tree_root,
 					&root->root_key, &root->root_item);
 		if (ret) {
+			clean_tree_block(trans, root, c);
 			free_extent_buffer(c);
 			return ret;
 		}
-- 
2.13.5




^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-11-10 14:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-06  1:42 [PATCH 1/2] btrfs-progs: Use clean_tree_block when btrfs_update_root fail Gu Jinxiang
2017-09-06  1:42 ` [PATCH 2/2] btrfs-progs: Replace some BUG_ON by return Gu Jinxiang
2017-11-10 14:11   ` Lakshmipathi.G

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).