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

From: Andrew Morton
Date: Mon May 17 2004 - 03:46:58 EST


Vladimir Saveliev <vs@xxxxxxxxxxx> 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.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/