Re: 1352 NUL bytes at the end of a page? (was Re: Assertion `s && s->tree' failed: The saga continues.)

Andrew Morton
2004-05-17T08:45:18Z

Vladimir Saveliev <vs@namesys.com> wrote:
>
> > + /*
> > + * If there is a pagecache page at the current i_size we need to lock
> > + * it while modifying i_size to synchronise against
> > + * block_write_full_page()'s sampling of i_size. Otherwise
> > + * block_write_full_page may decide to memset part of this page after
> > + * the application extended the file size.
> > + */
>
> Don't down-ings i_sem in do_truncate and in generic_file_write take care
> of this kind of race?

Nope, the only lock which block_write_full_page() can be guaranteed to hold
is the page lock.