* 2.4.23pre mm/slab.c error
@ 2003-11-07 8:36 Margit Schubert-While
2003-11-09 0:31 ` Robert Love
0 siblings, 1 reply; 2+ messages in thread
From: Margit Schubert-While @ 2003-11-07 8:36 UTC (permalink / raw)
To: linux-kernel
At lines 1786 to 1793 in mm/slab.c we have :
while (p != &searchp->slabs_free) {
#if DEBUG
slabp = list_entry(p, slab_t, list);
if (slabp->inuse)
BUG();
#endif
full_free++;
I think the "slabp =" should be above the "#if DEBUG".
Or ?
Margit
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: 2.4.23pre mm/slab.c error
2003-11-07 8:36 2.4.23pre mm/slab.c error Margit Schubert-While
@ 2003-11-09 0:31 ` Robert Love
0 siblings, 0 replies; 2+ messages in thread
From: Robert Love @ 2003-11-09 0:31 UTC (permalink / raw)
To: Margit Schubert-While; +Cc: linux-kernel
On Fri, 2003-11-07 at 03:36, Margit Schubert-While wrote:
> At lines 1786 to 1793 in mm/slab.c we have :
> while (p != &searchp->slabs_free) {
> #if DEBUG
> slabp = list_entry(p, slab_t, list);
>
> if (slabp->inuse)
> BUG();
> #endif
> full_free++;
>
> I think the "slabp =" should be above the "#if DEBUG".
> Or ?
Looks to me like nothing else uses slabp here but that if, so it is fine
to move it inside the DEBUG. It was outside the DEBUG in 2.4.22 and
earlier kernels, but moving it inside seems a safe optimization to me.
slabp is not used again until line ~1840, where it is given a new value.
Robert Love
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-11-09 0:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-07 8:36 2.4.23pre mm/slab.c error Margit Schubert-While
2003-11-09 0:31 ` Robert Love
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox