Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d7634482 authored by Liu Bo's avatar Liu Bo Committed by Chris Mason
Browse files

Btrfs: update to use fs_state bit



Now that we use bit operation to check fs_state, update
btrfs_free_fs_root()'s checker, otherwise we get back to
memory leak case.

Signed-off-by: default avatarLiu Bo <bo.li.liu@oracle.com>
Signed-off-by: default avatarJosef Bacik <jbacik@fusionio.com>
Signed-off-by: default avatarChris Mason <chris.mason@fusionio.com>
parent 3b277594
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3253,7 +3253,7 @@ void btrfs_free_fs_root(struct btrfs_fs_info *fs_info, struct btrfs_root *root)
	if (btrfs_root_refs(&root->root_item) == 0)
		synchronize_srcu(&fs_info->subvol_srcu);

	if (fs_info->fs_state & BTRFS_SUPER_FLAG_ERROR) {
	if (test_bit(BTRFS_FS_STATE_ERROR, &fs_info->fs_state)) {
		btrfs_free_log(NULL, root);
		btrfs_free_log_root_tree(NULL, fs_info);
	}