Re: [PATCH v2 3/3] btrfs: relocation: Use btrfs_backref_iterator infrastructure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 2020/2/14 下午5:00, Johannes Thumshirn wrote:
> On 14/02/2020 09:14, Qu Wenruo wrote:
>> @@ -677,9 +635,6 @@ struct backref_node *build_backref_tree(struct reloc_control *rc,
>>   	struct backref_node *exist = NULL;
>>   	struct backref_edge *edge;
>>   	struct rb_node *rb_node;
>> -	struct btrfs_key key;
>> -	unsigned long end;
>> -	unsigned long ptr;
>>   	LIST_HEAD(list); /* Pending edge list, upper node needs to be checked */
>>   	LIST_HEAD(useless);
>>   	int cowonly;
>> @@ -687,14 +642,14 @@ struct backref_node *build_backref_tree(struct reloc_control *rc,
>>   	int err = 0;
>>   	bool need_check = true;
>>   
>> -	path1 = btrfs_alloc_path();
>> -	path2 = btrfs_alloc_path();
>> -	if (!path1 || !path2) {
>> +	iterator = btrfs_backref_iterator_alloc(rc->extent_root->fs_info,
>> +						GFP_NOFS);
> 
> btrfs_backref_iterator_alloc() can fail and I don't see where a
> iterator == NULL condition is handled.
> 
Oops.

Thanks for catching this!
Qu

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux