Messages in this thread Patch in this message | | | Date | Wed, 8 Oct 2003 13:52:58 -0400 (EDT) | From | Rik van Riel <> | Subject | Re: [PATCH] page->flags corruption fix |
| |
On Wed, 8 Oct 2003, Marcelo Tosatti wrote:
> > A little of the above explanation in the change comment would be nice. > > Maybe comments on top of the code? > > Rik? :)
Here you are:
# This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.1193 -> 1.1194 # mm/filemap.c 1.89 -> 1.90 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 03/10/08 riel@cessna.boston.redhat.com 1.1194 # comment on why the atomic updates are needed, on request # -------------------------------------------- # diff -Nru a/mm/filemap.c b/mm/filemap.c --- a/mm/filemap.c Wed Oct 8 13:47:12 2003 +++ b/mm/filemap.c Wed Oct 8 13:47:12 2003 @@ -654,6 +654,12 @@ struct address_space *mapping, unsigned long offset, struct page **hash) { + /* + * Yes this is inefficient, however it is needed. The problem + * is that we could be adding a page to the swap cache while + * another CPU is also modifying page->flags, so the updates + * really do need to be atomic. -- Rik + */ ClearPageUptodate(page); ClearPageError(page); ClearPageDirty(page); - 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/
| |