question about fs/ubifs/orphan.c

Julia Lawall julia.lawall at lip6.fr
Sun Jul 8 05:22:46 EDT 2012


There is another occurrence of the same pattern in the function 
consolidate in the same file.

julia

On Sun, 8 Jul 2012, Julia Lawall wrote:

> The function ubifs_orphan_start_commit contains the code:
>
>        list_for_each_entry(orphan, &c->orph_new, new_list) {
>                ubifs_assert(orphan->new);
>                orphan->new = 0;
>                *last = orphan;
>                last = &orphan->cnext;
>        }
>        *last = orphan->cnext;
>
> After list_for_each_entry, orphan is just an address at an offset from the 
> list head, not a pointer to a real structure.  So it does not seem correct 
> to access its cnext field.
>
> julia
>



More information about the linux-mtd mailing list