Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 253271
b: refs/heads/master
c: f124c6a
h: refs/heads/master
i:
  253269: 6ac7865
  253267: 4d180c5
  253263: a3eafbd
v: v3
  • Loading branch information
Dan Carpenter authored and Konrad Rzeszutek Wilk committed Jun 3, 2011
1 parent d93592e commit d2dc20b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e5ac0bda96c495321dbad9b57a4b1a93a5a72e7f
refs/heads/master: f124c6ae59e193705c9ddac57684d50006d710e6
12 changes: 6 additions & 6 deletions trunk/arch/x86/xen/multicalls.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,10 @@ struct multicall_space __xen_mc_entry(size_t args)
unsigned argidx = roundup(b->argidx, sizeof(u64));

BUG_ON(preemptible());
BUG_ON(b->argidx > MC_ARGS);
BUG_ON(b->argidx >= MC_ARGS);

if (b->mcidx == MC_BATCH ||
(argidx + args) > MC_ARGS) {
(argidx + args) >= MC_ARGS) {
mc_stats_flush(b->mcidx == MC_BATCH ? FL_SLOTS : FL_ARGS);
xen_mc_flush();
argidx = roundup(b->argidx, sizeof(u64));
Expand All @@ -206,7 +206,7 @@ struct multicall_space __xen_mc_entry(size_t args)
ret.args = &b->args[argidx];
b->argidx = argidx + args;

BUG_ON(b->argidx > MC_ARGS);
BUG_ON(b->argidx >= MC_ARGS);
return ret;
}

Expand All @@ -216,22 +216,22 @@ struct multicall_space xen_mc_extend_args(unsigned long op, size_t size)
struct multicall_space ret = { NULL, NULL };

BUG_ON(preemptible());
BUG_ON(b->argidx > MC_ARGS);
BUG_ON(b->argidx >= MC_ARGS);

if (b->mcidx == 0)
return ret;

if (b->entries[b->mcidx - 1].op != op)
return ret;

if ((b->argidx + size) > MC_ARGS)
if ((b->argidx + size) >= MC_ARGS)
return ret;

ret.mc = &b->entries[b->mcidx - 1];
ret.args = &b->args[b->argidx];
b->argidx += size;

BUG_ON(b->argidx > MC_ARGS);
BUG_ON(b->argidx >= MC_ARGS);
return ret;
}

Expand Down

0 comments on commit d2dc20b

Please sign in to comment.