On Mon, Jun 6, 2016 at 4:50 PM, Linus Torvalds
<[email protected]> wrote:
>
>
> And I do want to repeat that the patch is entirely untested. It compiles.
> I looked at the assembly it generated. It looks fine to me, but I might
> have had a brainfart and done something completely broken.
Dammit.
I did that whole dcache_emit_entry() thing because we need to do the
final target cursor move regardless, and dcache_emit_entry() will
always return with the spinlock held again.
But then I didn't actually fix the "return" to a "break".
So the "return 0" here:
> + /* This will drop and re-take the dentry lock .. */
> + if (!dcache_emit_entry(ctx, dentry, child))
> return 0;
is fatal and woudl return with the spinlock held. It *should* have
been a "break" to exit the readdir loop.
So the patch I sent out was indeed a terminal brainfart, but with that
fix to change that return to a "break" it *might* work.
Linus