Re: 2.6.19-rc2-mm1

Cedric Le Goater
2006-10-18T20:26:53Z

> This fix will work. You should really call the non atomic version
> though, just so it is clear (and maybe some architectures care).

ok. I've updated the patch.

> Because we must service a fault if it happens here. The
> fault_in_pages_readable and comments are wrong AFAIKS.

hmm. It says :

/*
* Bring in the user page that we will copy from _first_.
* Otherwise there's a nasty deadlock on copying from the
* same page as we're writing to, without it being marked
* up-to-date.
*/

How can we improve it ?

thanks,

C.

Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
Cc: Andrew Morton <akpm@osdl.org>
Cc: Nick Piggin <npiggin@suse.de>
---
mm/filemap_xip.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Index: 2.6.19-rc2-mm1/mm/filemap_xip.c
===================================================================
--- 2.6.19-rc2-mm1.orig/mm/filemap_xip.c
+++ 2.6.19-rc2-mm1/mm/filemap_xip.c
@@ -317,7 +317,7 @@ __xip_file_write(struct file *filp, cons
break;
}

- copied = filemap_copy_from_user(page, offset, buf, bytes);
+ copied = filemap_copy_from_user_nonatomic(page, offset, buf, bytes);
flush_dcache_page(page);
if (likely(copied > 0)) {
status = copied;