Hello!
On Jan 29, 2015, at 2:49 PM, Frank Zago wrote:
>>> @@ -165,12 +165,14 @@ static inline int
update_get_reply_buf(struct
>>> update_reply *reply, void **buf,
>>> int result;
>>>
>>> ptr = update_get_buf_internal(reply, index, &size);
>>> +
>>> + LASSERT((ptr != NULL && size >= sizeof(int)));
>>
>>
>> Now size is tested before result. So it could assert if result < 0, while
>> the function would have returned before.
>
> But if prt is null krachar on the line:
> result = *(int *)ptr;
>
> Maybe there should be two LASSERT then.
Yes, that would be safer.
Actually I just noticed this function does not appear to be used in the client code at
all.
As such let's just remove update_get_reply_buf()?
In fat I bet this entire lustre_update.h contains server side updating code, and is
unused anywhere in the client code,
so we might just be able to easily remove that.
I see the only includer is ./lustre/ptlrpc/layout.c that I don't think actually
uses anything there?
Thanks.
Bye,
Oleg