Re: [PATCH 1b/7] dlm: core locking

Domen Puncer
2005-04-27T12:33:48Z

One thing I noticed (besides some trailing whitespace):

On 26/04/05 00:58 +0800, David Teigland wrote:
> + if (!r->res_lvbptr)
> + r->res_lvbptr = allocate_lvb(r->res_ls);
> +
> + if (!r->res_lvbptr)
> + return;

This suggests allocate_lvb can fail.

> +
> + memcpy(r->res_lvbptr, lkb->lkb_lvbptr, DLM_LVB_LEN);

...
However...
> +
> + if (!r->res_lvbptr)
> + r->res_lvbptr = allocate_lvb(r->res_ls);
> +
> + memcpy(r->res_lvbptr, lkb->lkb_lvbptr, DLM_LVB_LEN);

So... can it fail?

Domen