Re: [PATCH] Btrfs: add missing error check to find_parent_nodes

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

 



On Wed, Jul 31, 2013 at 12:00 AM, Zach Brown <zab@xxxxxxxxxx> wrote:
>> diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c
>> index 8bc5e8c..1ba87c5 100644
>> --- a/fs/btrfs/backref.c
>> +++ b/fs/btrfs/backref.c
>> @@ -935,6 +935,8 @@ again:
>>                               }
>>                               ret = find_extent_in_eb(eb, bytenr,
>>                                                       *extent_item_pos, &eie);
>> +                             if (ret < 0)
>> +                                     goto out;
>>                               ref->inode_list = eie;
>>                               free_extent_buffer(eb);
>>                       }
>
> The eb needs to be freed before the goto.
>
> And that there's now *three* eb freeing paths in this block should be a
> hint that it should be refactored into a function that frees the eb
> before returning.

Thanks, missed that previously.

>
> - z



-- 
Filipe David Manana,

"Reasonable men adapt themselves to the world.
 Unreasonable men adapt the world to themselves.
 That's why all progress depends on unreasonable men."
--
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




[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