提交 57a5a882 编写于 作者: D Dan Carpenter 提交者: Chris Mason

Btrfs: checking for NULL instead of IS_ERR

add_qgroup_rb() never returns NULL, only error pointers.
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
上级 5986802c
...@@ -1364,8 +1364,10 @@ int btrfs_qgroup_inherit(struct btrfs_trans_handle *trans, ...@@ -1364,8 +1364,10 @@ int btrfs_qgroup_inherit(struct btrfs_trans_handle *trans,
spin_lock(&fs_info->qgroup_lock); spin_lock(&fs_info->qgroup_lock);
dstgroup = add_qgroup_rb(fs_info, objectid); dstgroup = add_qgroup_rb(fs_info, objectid);
if (!dstgroup) if (IS_ERR(dstgroup)) {
ret = PTR_ERR(dstgroup);
goto unlock; goto unlock;
}
if (srcid) { if (srcid) {
srcgroup = find_qgroup_rb(fs_info, srcid); srcgroup = find_qgroup_rb(fs_info, srcid);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册