From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933393AbbLSUJo (ORCPT ); Sat, 19 Dec 2015 15:09:44 -0500 Received: from www.linutronix.de ([62.245.132.108]:43860 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932713AbbLSUI3 (ORCPT ); Sat, 19 Dec 2015 15:08:29 -0500 Message-Id: <20151219200607.432780944@linutronix.de> User-Agent: quilt/0.63-1 Date: Sat, 19 Dec 2015 20:07:40 -0000 From: Thomas Gleixner To: LKML Cc: Ingo Molnar , Peter Zijlstra , Darren Hart , Davidlohr Bueso , Bhuvanesh_Surachari@mentor.com, Andy Lowe Subject: [patch 4/5] futex: Remove pointless put_pi_state calls in requeue() References: <20151219200501.563704646@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Disposition: inline; filename=futex--Remove-pointless-free_pi_state-calls-in-requeue() X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001,URIBL_BLOCKED=0.001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In the error handling cases we neither have pi_state nor a reference to it. Remove the pointless code. Signed-off-by: Thomas Gleixner --- kernel/futex.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) --- a/kernel/futex.c +++ b/kernel/futex.c @@ -1737,9 +1737,9 @@ static int futex_requeue(u32 __user *uad case 0: /* We hold a reference on the pi state. */ break; + + /* If the above failed, then pi_state is NULL */ case -EFAULT: - put_pi_state(pi_state); - pi_state = NULL; double_unlock_hb(hb1, hb2); hb_waiters_dec(hb2); put_futex_key(&key2); @@ -1755,8 +1755,6 @@ static int futex_requeue(u32 __user *uad * exit to complete. * - The user space value changed. */ - put_pi_state(pi_state); - pi_state = NULL; double_unlock_hb(hb1, hb2); hb_waiters_dec(hb2); put_futex_key(&key2);