Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 30820
b: refs/heads/master
c: 59e0e0a
h: refs/heads/master
v: v3
  • Loading branch information
Sebastien Dugue authored and Linus Torvalds committed Jun 28, 2006
1 parent 124b78c commit 4a124c7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 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: 95e02ca9bb5324360e7dea1ea1c563036d84a5e6
refs/heads/master: 59e0e0ace7d33e8c0c125042f153f80fcc56b39e
13 changes: 8 additions & 5 deletions trunk/kernel/futex.c
Original file line number Diff line number Diff line change
Expand Up @@ -827,17 +827,20 @@ static int futex_requeue(u32 __user *uaddr1, u32 __user *uaddr2,
if (++ret <= nr_wake) {
wake_futex(this);
} else {
list_move_tail(&this->list, &hb2->chain);
this->lock_ptr = &hb2->lock;
/*
* If key1 and key2 hash to the same bucket, no need to
* requeue.
*/
if (likely(head1 != &hb2->chain)) {
list_move_tail(&this->list, &hb2->chain);
this->lock_ptr = &hb2->lock;
}
this->key = key2;
get_key_refs(&key2);
drop_count++;

if (ret - nr_wake >= nr_requeue)
break;
/* Make sure to stop if key1 == key2: */
if (head1 == &hb2->chain && head1 != &next->list)
head1 = &this->list;
}
}

Expand Down

0 comments on commit 4a124c7

Please sign in to comment.