aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xenpaging/policy_default.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/xenpaging/policy_default.c')
-rw-r--r--tools/xenpaging/policy_default.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/tools/xenpaging/policy_default.c b/tools/xenpaging/policy_default.c
index c5c71f1b37..596afc7d9a 100644
--- a/tools/xenpaging/policy_default.c
+++ b/tools/xenpaging/policy_default.c
@@ -77,7 +77,7 @@ int policy_init(struct xenpaging *paging)
return rc;
}
-int policy_choose_victim(struct xenpaging *paging, struct victim *victim)
+unsigned long policy_choose_victim(struct xenpaging *paging)
{
xc_interface *xch = paging->xc_handle;
unsigned long wrap = current_gfn;
@@ -102,16 +102,13 @@ int policy_choose_victim(struct xenpaging *paging, struct victim *victim)
/* One more round before returning ENOSPC */
continue;
}
- victim->gfn = INVALID_MFN;
- return -ENOSPC;
+ return INVALID_MFN;
}
}
while ( test_bit(current_gfn, bitmap) || test_bit(current_gfn, unconsumed) );
set_bit(current_gfn, unconsumed);
- victim->gfn = current_gfn;
-
- return 0;
+ return current_gfn;
}
void policy_notify_paged_out(unsigned long gfn)