From ebb201ee68f4160c3f4ade21da759ee09efc11fd Mon Sep 17 00:00:00 2001 From: Michael Banck Date: Thu, 25 Aug 2005 22:14:52 +0000 Subject: * debian/patches/sysvshm.patch: New patch by Marcus Brinkmann. --- debian/changelog | 1 + debian/patches/sysvshm.patch | 64 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 debian/patches/sysvshm.patch 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 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 + + * pager.c: Include . + (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 + #include ++#include + #include + #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); + } + -- cgit v1.2.3