From mboxrd@z Thu Jan 1 00:00:00 1970 From: Boaz Harrosh Subject: [PATCH] exofs: Remove dead code in read_exec Date: Fri, 30 Nov 2012 16:28:03 +0200 Message-ID: <50B8C273.1040702@panasas.com> References: <1353941346-20598-1-git-send-email-idank@tonian.com> <50B8BE60.6090009@panasas.com> <50B8BF8D.8050704@panasas.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: Idan Kedar , To: Return-path: Received: from natasha.panasas.com ([67.152.220.90]:36343 "EHLO natasha.panasas.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932962Ab2K3O2K (ORCPT ); Fri, 30 Nov 2012 09:28:10 -0500 In-Reply-To: <50B8BF8D.8050704@panasas.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: The if (!pcol->read_4_write) at the error path is redundant because all goto err; are after the if (pcol->read_4_write) bale out. Signed-off-by: Boaz Harrosh --- fs/exofs/inode.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fs/exofs/inode.c b/fs/exofs/inode.c index 87f05d9..449da05 100644 --- a/fs/exofs/inode.c +++ b/fs/exofs/inode.c @@ -364,9 +364,7 @@ err: if (!pcol_copy) /* Failed before ownership transfer */ pcol_copy = pcol; - if (!pcol->read_4_write) - _unlock_pcol_pages(pcol_copy, ret, READ); - + _unlock_pcol_pages(pcol_copy, ret, READ); pcol_free(pcol_copy); kfree(pcol_copy); return ret; -- 1.7.10.2.677.gb6bc67f