提交 47a306a7 编写于 作者: E Eric Sandeen 提交者: Chris Mason

btrfs: fix error handling in create_pending_snapshot

fcebe456 cut and pasted some code to a later point
in create_pending_snapshot(), but didn't switch
to the appropriate error handling for this stage
of the function.
Signed-off-by: NEric Sandeen <sandeen@redhat.com>
Signed-off-by: NChris Mason <clm@fb.com>
上级 3e2426bd
...@@ -1284,11 +1284,13 @@ static noinline int create_pending_snapshot(struct btrfs_trans_handle *trans, ...@@ -1284,11 +1284,13 @@ static noinline int create_pending_snapshot(struct btrfs_trans_handle *trans,
goto fail; goto fail;
} }
pending->error = btrfs_qgroup_inherit(trans, fs_info, ret = btrfs_qgroup_inherit(trans, fs_info,
root->root_key.objectid, root->root_key.objectid,
objectid, pending->inherit); objectid, pending->inherit);
if (pending->error) if (ret) {
goto no_free_objectid; btrfs_abort_transaction(trans, root, ret);
goto fail;
}
/* see comments in should_cow_block() */ /* see comments in should_cow_block() */
set_bit(BTRFS_ROOT_FORCE_COW, &root->state); set_bit(BTRFS_ROOT_FORCE_COW, &root->state);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册