i_size = new_i_size;
> > increment counter
> > read counter
> > ->nopage
check i_size
> > vmtruncate
> > read counter again -> different so retry
> >
> > thanks to the second counter increment after vmtruncate in my fix, the
> > above race couldn't happen.
>
> The trick is that CPU 0 is expected to have updated the filesystem's
> idea of what pages are available before calling vmtruncate,
> invalidate_mmap_range() or whichever.
i_size has been updated, and filemap_nopage() will return NULL.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/