Just my opinion on this change:
> - if (!grow_buffers(GFP_ATOMIC, size))
> + if (grow_buffers(GFP_ATOMIC, size))
> + needed -= PAGE_SIZE;
> + else
> wakeup_bdflush(1);
> - needed -= PAGE_SIZE;
> goto repeat;
If grow_buffers(GFP_ATOMIC, size) fails, that means that we have'nt been
able to allocate a page and buffer headers, and sure that we are very
low in memory.
Since "bdflush" seems not to wait for IO completion, I'm not sure it is
clever to try again to find some candidates if some buffer has been
freed yet.
I would prefer the following code.
else {
wakeup_bdflush(1);
if (free_list[size])/* Better to give up than to die stupidly */
return;
}
Gerard.