Re: JFFS2 oops when writing to two partitions simultaneously

Orjan Friberg
2012-01-26T14:07:16Z

On 01/26/2012 02:16 PM, Joakim Tjernlund wrote:
> Anyhow, I think it is stupid (and probably buggy) to have kfree and kmalloc
> as separate. Why is it not done at the same time?

To me it looks like the lock must be held the entire time. We can't
allow two contexts using (i.e. freeing/allocating/writing to) the
compressor's compr_buf.

Maybe the lock used here should be on a per-compressor basis, rather
than on the list as a whole. (The list lock is still needed when adding
to/removing from the list of course.)