* [PATCH] shmem fixes against 2.4.3-ac2
@ 2001-04-05 6:11 Marcelo Tosatti
0 siblings, 0 replies; only message in thread
From: Marcelo Tosatti @ 2001-04-05 6:11 UTC (permalink / raw)
To: Christoph Rohland, Stephen C. Tweedie; +Cc: Alan Cox, linux-mm
Hi,
The following patch fixes two bugs in the shm code in 2.4.3-ac2 (and ac3,
too):
- shmem_writepage() does not set the page dirty bit on a page in case it
does not get moved to the swapcache because it has pte's mapped to it.
- in case of a SIGBUS for a page fault on an shmem page, the inode lock
will remain locked forever.
--- mm/shmem.c.orig Wed Apr 4 06:44:45 2001
+++ mm/shmem.c Thu Apr 5 04:39:03 2001
@@ -236,8 +236,10 @@
/* Only move to the swap cache if there are no other users of
* the page. */
- if (atomic_read(&page->count) > 2)
+ if (atomic_read(&page->count) > 2) {
+ set_page_dirty(page);
goto out;
+ }
inode = page->mapping->host;
info = &inode->u.shmem_i;
@@ -432,6 +434,7 @@
*ptr = NOPAGE_SIGBUS;
return error;
sigbus:
+ up (&inode->i_sem);
*ptr = NOPAGE_SIGBUS;
return -EFAULT;
}
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-04-05 6:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-05 6:11 [PATCH] shmem fixes against 2.4.3-ac2 Marcelo Tosatti
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox