From patchwork Fri Nov 29 17:01:15 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Nazarewicz X-Patchwork-Id: 3259041 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 63586BEEAE for ; Fri, 29 Nov 2013 17:01:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 524D620652 for ; Fri, 29 Nov 2013 17:01:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3FBD820685 for ; Fri, 29 Nov 2013 17:01:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757152Ab3K2RB0 (ORCPT ); Fri, 29 Nov 2013 12:01:26 -0500 Received: from mail-we0-f182.google.com ([74.125.82.182]:52326 "EHLO mail-we0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756750Ab3K2RBX (ORCPT ); Fri, 29 Nov 2013 12:01:23 -0500 Received: by mail-we0-f182.google.com with SMTP id q59so9754903wes.27 for ; Fri, 29 Nov 2013 09:01:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=5foHM2uigpHl/SSVA3V7KuBGhaKLSz7oI0415VRu03U=; b=IwM2djoQc5LsyzvCKsbhswwiYYCBC0/SflXmgEafGBefBo3B59YPaGwvnLuBH5BWUA +efvvG3RLB11yqU1gmE/7QR0kQRFVIKmPDsU1E21gN5KWekRsEUyWF745+rtTvMW8l7+ 1ZAN9C3e1+7C1imj18hQ4NXyUXh1bbisAGQktDmV026Ec2PdtGnlD2BfNGC1P35mhIx8 O58Ix3QwGKvdaJA5kiAq1zrgwRqvvyc1veTQHlLcaKo5inXlxmkTwFilVMqEeT2GLcKg D5xuwyz/M5XMXJ4lqNUUkWMfljipdrj7D7TD4NCcnkyntlb6x6pXc0U0VnM64OxlAroO UMbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=5foHM2uigpHl/SSVA3V7KuBGhaKLSz7oI0415VRu03U=; b=PqzXbfZNcPu8QlQ9EjqUxuz8alL22LgI62E2Rjq0b00kpd5DYFWVaDaeNQudgi4E89 YSAzi0vvi61Xlmp64i69bf6UQbi3FCd/TIwRLThaz0cRQQ46JEvcWni5C2Z0S3otkt0O 2oF+9cS8txTwPkHwAWQBea/QNTLZ6VjvHqRZl4YzSs6XJsHH3FjmFhx4/AhEdRwjxi1K kqCOCNEY24pJolhvYEEdjV723L0fiWAU+ZDjBkcFIJVCQW/2RXCCEfH1DtlK1LHJF9kv olAzauqUS2STuBPIGaxp4r7AoicvnTwlPCR7L7Qp3W2o3ZPeUDK6guD8X0CzbSSrEo/4 1qvw== X-Gm-Message-State: ALoCoQm8Qrhtq4f6fVV+7gINNzUFC8sMa6dJdRcY5OMWVV2iybVX50Y77L6aNFpr/j3zVxND3h5k4lJ0bHiSC5HWhlkaDrV1pcZYHmM39wkwkOnODr9adG6QEYlKXe9B5LYfsBfFfBIiYtvTmOgCDVoETEa5qNOK3qWLmJzix0/Ye9E4U9x4TCBAUCvdOhyvwB7XTKeygb8dMTTg2z6CxqI8x0BVf3s85g== X-Received: by 10.194.122.131 with SMTP id ls3mr17529325wjb.0.1385744482311; Fri, 29 Nov 2013 09:01:22 -0800 (PST) Received: from mpn-glaptop.corp.google.com ([2620:0:105f:311:d1f0:e5a8:f5fb:b9f9]) by mx.google.com with ESMTPSA id n6sm73620511wix.3.2013.11.29.09.01.20 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 29 Nov 2013 09:01:21 -0800 (PST) From: Michal Nazarewicz To: Chris Mason , Filipe David Borba Manana Cc: linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] btrfs: remove dead code Date: Fri, 29 Nov 2013 18:01:15 +0100 Message-Id: <1385744475-9614-1-git-send-email-mpn@google.com> X-Mailer: git-send-email 1.8.4.1 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Michal Nazarewicz [commit 8185554d: fix incorrect inode acl reset] introduced a dead code by adding a condition which can never be true to an else branch. The condition can never be true because it is already checked by a previous if statement which causes function to return. Signed-off-by: Michal Nazarewicz Reviewed-By: Filipe David Borba Manana --- fs/btrfs/acl.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/fs/btrfs/acl.c b/fs/btrfs/acl.c index 0890c83..460f36b 100644 --- a/fs/btrfs/acl.c +++ b/fs/btrfs/acl.c @@ -225,13 +225,8 @@ int btrfs_init_acl(struct btrfs_trans_handle *trans, ret = posix_acl_create(&acl, GFP_NOFS, &inode->i_mode); if (ret < 0) return ret; - - if (ret > 0) { - /* we need an acl */ + if (ret > 0) /* we need an acl */ ret = btrfs_set_acl(trans, inode, acl, ACL_TYPE_ACCESS); - } else if (ret < 0) { - cache_no_acl(inode); - } } else { cache_no_acl(inode); }