Re: [PATCH][RFC] truncate vs add_to_page_cache race

From: Andrew Morton
Date: Fri May 14 2004 - 19:03:10 EST

Nick Piggin <nickpiggin@xxxxxxxxxxxx> wrote:
> I think the entire problem can be fixed by ensuring ->readpage and
> do_generic_mapping read see the same i_size. This would either mean
> passing i_size to or from ->readpage, *or* having ->readpage return
> the number of bytes read, for example.

Or not check i_size in ->readpage at all?

If fixing this is going to cost extra fastpath cycles I'd be inclined to
not bother, frankly.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at