diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2009-05-20 03:18:50 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2009-05-20 04:28:45 -0400 |
commit | c8b15a706d921baed3195407e4f55270112bb3c6 (patch) | |
tree | 514a45eb575cd093043fe1471ff579ffe439db3f /kernel/futex.c | |
parent | 521c180874dae86f675d23c4eade4dba8b1f2cc8 (diff) |
futex: cleanup error exit
Reuse the put_key_ref(key2) call in the exit path.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/futex.c')
-rw-r--r-- | kernel/futex.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/kernel/futex.c b/kernel/futex.c index 476603afd147..381125a9f1e0 100644 --- a/kernel/futex.c +++ b/kernel/futex.c | |||
@@ -2185,10 +2185,8 @@ static int futex_wait_requeue_pi(u32 __user *uaddr, int fshared, | |||
2185 | 2185 | ||
2186 | /* Prepare to wait on uaddr. */ | 2186 | /* Prepare to wait on uaddr. */ |
2187 | ret = futex_wait_setup(uaddr, val, fshared, &q, &hb); | 2187 | ret = futex_wait_setup(uaddr, val, fshared, &q, &hb); |
2188 | if (ret) { | 2188 | if (ret) |
2189 | put_futex_key(fshared, &key2); | 2189 | goto out_key2; |
2190 | goto out; | ||
2191 | } | ||
2192 | 2190 | ||
2193 | /* Queue the futex_q, drop the hb lock, wait for wakeup. */ | 2191 | /* Queue the futex_q, drop the hb lock, wait for wakeup. */ |
2194 | futex_wait_queue_me(hb, &q, to); | 2192 | futex_wait_queue_me(hb, &q, to); |
@@ -2282,6 +2280,7 @@ static int futex_wait_requeue_pi(u32 __user *uaddr, int fshared, | |||
2282 | 2280 | ||
2283 | out_put_keys: | 2281 | out_put_keys: |
2284 | put_futex_key(fshared, &q.key); | 2282 | put_futex_key(fshared, &q.key); |
2283 | out_key2: | ||
2285 | put_futex_key(fshared, &key2); | 2284 | put_futex_key(fshared, &key2); |
2286 | 2285 | ||
2287 | out: | 2286 | out: |