2004-09-28  Ognyan Kulev  <[EMAIL PROTECTED]>

        * data-request.c (_pager_seqnos_memory_object_data_request):
        When pager state is not NORMAL, shorten exit path.
        When _pager_pagemap_resize fails, add call to
        _pager_allow_termination.

diff -urpN --exclude='*~' --exclude=build --exclude='*#*' /home/ogi/cvs/hurd/libpager/data-request.c libpager/data-request.c
--- /home/ogi/cvs/hurd/libpager/data-request.c 2002-05-08 12:22:14.000000000 +0300
+++ libpager/data-request.c 2004-09-28 10:27:33.000000000 +0300
@@ -1,5 +1,5 @@
/* Implementation of memory_object_data_request for pager library
- Copyright (C) 1994,95,96,97,2000,02 Free Software Foundation
+ Copyright (C) 1994,95,96,97,2000,02,04 Free Software Foundation, Inc.


    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License as
@@ -40,11 +40,11 @@ _pager_seqnos_memory_object_data_request
   if (!p)
     return EOPNOTSUPP;

-  /* Acquire the right to meddle with the pagemap */
+  /* Acquire the right to meddle with the pagemap.  */
   mutex_lock (&p->interlock);
   _pager_wait_for_seqno (p, seqno);

-  /* sanity checks -- we don't do multi-page requests yet.  */
+  /* Sanity checks -- we don't do multi-page requests yet.  */
   if (control != p->memobjcntl)
     {
       printf ("incg data request: wrong control port\n");
@@ -67,14 +67,16 @@ _pager_seqnos_memory_object_data_request
   if (p->pager_state != NORMAL)
     {
       printf ("pager in wrong state for read\n");
-      _pager_release_seqno (p, seqno);
-      mutex_unlock (&p->interlock);
-      goto allow_term_out;
+      _pager_allow_termination (p);
+      goto release_out;
     }

   err = _pager_pagemap_resize (p, offset + length);
   if (err)
-    goto release_out;          /* Can't do much about the actual error.  */
+    {
+      _pager_allow_termination (p);
+      goto release_out;          /* Can't do much about the actual error.  */
+    }

   /* If someone is paging this out right now, the disk contents are
      unreliable, so we have to wait.  It is too expensive (right now) to



_______________________________________________
Bug-hurd mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/bug-hurd

Reply via email to