Re: [PATCH] Fix mpage_writepage() for pages with buffers

From: Linus Torvalds
Date: Tue Oct 10 2017 - 16:31:52 EST


On Tue, Oct 10, 2017 at 12:44 PM, Andrew Morton
<akpm@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> This is all pretty mature code (isn't it?). Any idea why this bug
> popped up now?

Also, while the patch looks sane, the

clean_buffers(page, PAGE_SIZE);

line really threw me. That's an insane value to pick, it looks like
"bytes in page", but it isn't. It's just a random value that is bigger
than "PAGE_SIZE >> SECTOR_SHIFT".

I'd prefer to see just ~0u if the intention is just "bigger than
anything possible".

Linus