summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Banck <mbanck@debian.org>2005-08-25 22:14:52 +0000
committerMichael Banck <mbanck@debian.org>2005-08-25 22:14:52 +0000
commitebb201ee68f4160c3f4ade21da759ee09efc11fd (patch)
tree2694dfe0b088b2557ab73cf1ec41691b0f99a611
parent6149a773f9ab32dfccb216be92b10939f5205d08 (diff)
* debian/patches/sysvshm.patch: New patch by Marcus Brinkmann.
-rw-r--r--debian/changelog1
-rw-r--r--debian/patches/sysvshm.patch64
2 files changed, 65 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index d14b6fc0..bf3b1027 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -14,6 +14,7 @@ hurd (20050513-3+SVN) unreleased; urgency=low
* debian/patches/magic_port_leak.patch: New patch by Marcus
Brinkmann, taken from CVS.
* debian/patches/ftpfs_fix.patch: New patch by Samuel Thibault.
+ * debian/patches/sysvshm.patch: New patch by Marcus Brinkmann.
-- Michael Banck <mbanck@debian.org> Sun, 12 Jun 2005 23:53:59 +0200
diff --git a/debian/patches/sysvshm.patch b/debian/patches/sysvshm.patch
new file mode 100644
index 00000000..61c37a30
--- /dev/null
+++ b/debian/patches/sysvshm.patch
@@ -0,0 +1,64 @@
+2005-03-09 Marcus Brinkmann <marcus@flubber>
+
+ * pager.c: Include <sys/stat.h>.
+ (pager_clear_user_data): Set the S_IMMAP0 flag in the node's stat
+ mode.
+ (diskfs_get_filemap): Clear the S_IMMAP0 flag in the node's stat
+ mode after creating the pager.
+ * inode.c (read_node): Set the S_IMMAP0 flag in the node's stat
+ mode.
+
+diff -rup cvs/hurd/ext2fs/inode.c work/hurd/ext2fs/inode.c
+--- ext2fs/inode.c 2002-10-08 19:10:09.000000000 -0400
++++ ext2fs/inode.c 2005-03-09 17:27:34.000000000 -0500
+@@ -310,6 +312,9 @@ read_node (struct node *np)
+ offset = np->allocsize & ((1 << log2_block_size) - 1);
+ if (offset > 0)
+ np->allocsize += block_size - offset;
++
++ /* We start out with no map users. */
++ st->st_mode |= S_IMMAP0;
+ }
+ else
+ /* Allocsize should be zero for anything except directories, files, and
+diff -rup cvs/hurd/ext2fs/pager.c work/hurd/ext2fs/pager.c
+--- ext2fs/pager.c 2002-06-11 17:38:01.000000000 -0400
++++ ext2fs/pager.c 2005-03-09 17:45:27.000000000 -0500
+@@ -20,6 +20,7 @@
+
+ #include <string.h>
+ #include <errno.h>
++#include <sys/stat.h>
+ #include <hurd/store.h>
+ #include "ext2fs.h"
+
+@@ -744,6 +745,7 @@ pager_clear_user_data (struct user_pager
+ if (upi->type == FILE_DATA)
+ {
+ struct pager *pager;
++ struct node *np;
+
+ spin_lock (&node_to_page_lock);
+ pager = upi->node->dn->pager;
+@@ -751,6 +753,11 @@ pager_clear_user_data (struct user_pager
+ upi->node->dn->pager = 0;
+ spin_unlock (&node_to_page_lock);
+
++ np = upi->node;
++ mutex_lock (&np->lock);
++ np->dn_stat.st_mode |= S_IMMAP0;
++ mutex_unlock (&np->lock);
++
+ diskfs_nrele_light (upi->node);
+ }
+
+@@ -824,6 +831,8 @@ diskfs_get_filemap (struct node *node, v
+ return MACH_PORT_NULL;
+ }
+
++ node->dn_stat.st_mode &= ~S_IMMAP0;
++
+ right = pager_get_port (node->dn->pager);
+ ports_port_deref (node->dn->pager);
+ }
+