diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2014-04-04 22:57:30 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2014-04-04 22:57:30 +0200 |
commit | 7b31485553ed6a1cbc1ddde0ae3e678e404d1f97 (patch) | |
tree | 8e7476d8aefd478e2ab6a72b5bcad49ce48817c4 /libpager/data-return.c | |
parent | 58f78ea0c81a106cb2b9220eb9290bef15466cd9 (diff) | |
parent | b7cbdde8854ee4c51ec9cd49ce639bd02d646355 (diff) | |
download | hurd-7b31485553ed6a1cbc1ddde0ae3e678e404d1f97.tar.gz hurd-7b31485553ed6a1cbc1ddde0ae3e678e404d1f97.tar.bz2 hurd-7b31485553ed6a1cbc1ddde0ae3e678e404d1f97.zip |
Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/hurd
Diffstat (limited to 'libpager/data-return.c')
-rw-r--r-- | libpager/data-return.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/libpager/data-return.c b/libpager/data-return.c index 6a3b9037..ee6c6e83 100644 --- a/libpager/data-return.c +++ b/libpager/data-return.c @@ -26,7 +26,7 @@ as for _pager_seqnos_memory_object_data_return; the additional INITIALIZING arg identifies which function is calling us. */ kern_return_t -_pager_do_write_request (mach_port_t object, +_pager_do_write_request (struct pager *p, mach_port_seqno_t seqno, mach_port_t control, vm_offset_t offset, @@ -36,7 +36,6 @@ _pager_do_write_request (mach_port_t object, int kcopy, int initializing) { - struct pager *p; short *pm_entries; int npages, i; char *notified; @@ -47,8 +46,8 @@ _pager_do_write_request (mach_port_t object, int wakeup; int omitdata = 0; - p = ports_lookup_port (0, object, _pager_class); - if (!p) + if (!p + || p->port.class != _pager_class) return EOPNOTSUPP; /* Acquire the right to meddle with the pagemap */ @@ -249,19 +248,17 @@ _pager_do_write_request (mach_port_t object, } } - ports_port_deref (p); return 0; release_out: _pager_release_seqno (p, seqno); pthread_mutex_unlock (&p->interlock); - ports_port_deref (p); return 0; } /* Implement pageout call back as described by <mach/memory_object.defs>. */ kern_return_t -_pager_seqnos_memory_object_data_return (mach_port_t object, +_pager_seqnos_memory_object_data_return (struct pager *p, mach_port_seqno_t seqno, mach_port_t control, vm_offset_t offset, @@ -270,6 +267,6 @@ _pager_seqnos_memory_object_data_return (mach_port_t object, int dirty, int kcopy) { - return _pager_do_write_request (object, seqno, control, offset, data, + return _pager_do_write_request (p, seqno, control, offset, data, length, dirty, kcopy, 0); } |