lkml.org 
[lkml]   [2015]   [May]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/4] perf tools: Fix dso__data_read_offset() file opening
On 20/05/2015 6:11 p.m., Namhyung Kim wrote:
> On Wed, May 20, 2015 at 11:12:10AM +0300, Adrian Hunter wrote:
>> On 20/05/15 09:34, Namhyung Kim wrote:
>>> {
>>> enum dso_binary_type binary_type_data[] = {
>>> DSO_BINARY_TYPE__BUILD_ID_CACHE,
>>> @@ -457,14 +449,6 @@ int dso__data_fd(struct dso *dso, struct machine *machine)
>>> };
>>> int i = 0;
>>>
>>> - if (dso->data.status == DSO_DATA_STATUS_ERROR)
>>> - return -1;
>>
>> Please retain this check. It is needed to prevent repeatedly
>> trying to open files that aren't there.
>
> I just move it out of the function, so it'll be checked before
> entering this function without lock.

data_file_size() isn't doing that though. It just calls try_to_open_dso()



\
 
 \ /
  Last update: 2015-05-20 18:01    [W:0.179 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site