lkml.org 
[lkml]   [2006]   [Jun]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] rfc: fix splice mapping race?
On Sun, Jun 18, 2006 at 12:02:45PM +0200, Peter Zijlstra wrote:
> > In page migration, detect the missing mapping early and bail out if
> > that is the case: the page is not going to get un-truncated, so
> > retrying is just a waste of time.
> >
> > Signed-off-by: Nick Piggin <npiggin@suse.de>
>
> Looks sane, except the change in migrate (comment there). I like the
> remove_mapping() pre-conditions.

Thanks.

> > --- linux-2.6.orig/mm/migrate.c
> > +++ linux-2.6/mm/migrate.c
> > @@ -136,9 +136,13 @@ static int swap_page(struct page *page)
> > {
> > struct address_space *mapping = page_mapping(page);
> >
> > - if (page_mapped(page) && mapping)
> > + if (!mapping)
> > + return -EINVAL; /* page truncated. signal permanent failure */
>
> Here, I think you need to unlock the page too.

Bah, yes thanks... I'll post an updated patch after others have
had time to comment.

Nick
-
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/

\
 
 \ /
  Last update: 2006-06-18 12:14    [W:1.080 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site