Jan Schmidt 写道:
..[snip]..
>
> I don't see where I'm calling ulist_free(roots) in the error path. One of us is
> missing something :-)
Yeah, you are right. i read a more '}'.. ^_^
Thanks,
Wang
>
>>> + spin_lock(&fs_info->qgroup_lock);
>>> + seq = fs_info->qgroup_seq;
>>> + fs_info->qgroup_seq += roots->nnodes + 1; /* max refcnt */
>>> +
>>> + ulist_reinit(tmp);
>>> + ULIST_ITER_INIT(&uiter);
>>> + while ((unode = ulist_next(roots, &uiter))) {
>>> + struct btrfs_qgroup *qg;
>>> +
>>> + qg = find_qgroup_rb(fs_info, unode->val);
>>> + if (!qg)
>>> + continue;
>>> +
>>> + ulist_add(tmp, qg->qgroupid, (uintptr_t)qg, GFP_ATOMIC);
>>
>> For this patch, you forget to add the check about ulist_add(), ulist_add() may
>> return -ENOMEM. In fact, i have sent the patch to fix this problem in qgroup.c before.
>> So you don't need to change patch1, but you dose need to add the check in the patch2.
>
> Thanks for noticing, I'll send a fix in a few days to leave room for more comments.
>
> -Jan
>
>>> + }
[snip]
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html