774 int nr_wake, int nr_wake2, int op)
775{
776 union futex_key key1, key2;
777 struct futex_hash_bucket *hb1, *hb2;
778 struct plist_head *head;
779 struct futex_q *this, *next;
780 int ret, op_ret, attempt = 0;
781
782retryfull:
783 futex_lock_mm(fshared);
784
785 ret = get_futex_key(uaddr1, fshared, &key1);
786 if (unlikely(ret != 0))
787 goto out;
788 ret = get_futex_key(uaddr2, fshared, &key2);
789 if (unlikely(ret != 0))
790 goto out;
791
792 hb1 = hash_futex(&key1);
793 hb2 = hash_futex(&key2);
794
795retry:
796 double_lock_hb(hb1, hb2);
797
798 op_ret = futex_atomic_op_inuser(op, uaddr2);
799 if (unlikely(op_ret < 0)) {
800 u32 dummy;
801
802 spin_unlock(&hb1->lock);
803 if (hb1 != hb2)
804 spin_unlock(&hb2->lock);
805
806#ifndef CONFIG_MMU
807
808
809
810
811 ret = op_ret;
812 goto out;
813#endif
814