From patchwork Mon Apr 14 06:37:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daeseok Youn X-Patchwork-Id: 3976821 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 32FB09F336 for ; Mon, 14 Apr 2014 06:37:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6FEBA201C0 for ; Mon, 14 Apr 2014 06:37:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A2B162018E for ; Mon, 14 Apr 2014 06:37:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750898AbaDNGhK (ORCPT ); Mon, 14 Apr 2014 02:37:10 -0400 Received: from mail-pa0-f54.google.com ([209.85.220.54]:56388 "EHLO mail-pa0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750768AbaDNGhI (ORCPT ); Mon, 14 Apr 2014 02:37:08 -0400 Received: by mail-pa0-f54.google.com with SMTP id lf10so7831728pab.41 for ; Sun, 13 Apr 2014 23:37:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:user-agent:mime-version :content-transfer-encoding:content-type; bh=fj21dq2rg3eU34fQhOuZCaWoZ5KBX9zIhxo/3OjaGt0=; b=On1zt+X8faIVt5LIUYnTjcfW3RTsz3Tk7JVrAmkRAVZfelxFxeU7JY+OI7eALYuZct DX3+3HxAV5/ajbRiVQX3gwEdaFyrcGCFIsZmylpwZa4vZMJMRMBZyznhg5T4PIP+F96e zexGyWKBAqq1go+z2XMDUbcSYCYzvkhKOlvv9t9CFGC7wo4NSUGy1H8yOcraE9vVHvWg 9dBE7aaSzNZ1LiBiJ7q0RSor17sjBM2UgD/mcrdENOW7ZjY0pjUPPv48MBvW4urEkWu2 zNiX56VKJ5PeBgjdkxVvzJwDHIELm+7s8GoKnyN9Ej98khWiwH9beitlmc2p9eOU7nPM O9AQ== X-Received: by 10.68.201.67 with SMTP id jy3mr42399890pbc.20.1397457427821; Sun, 13 Apr 2014 23:37:07 -0700 (PDT) Received: from daeseok-laptop.cloud.net ([121.50.21.19]) by mx.google.com with ESMTPSA id f3sm31626543pbg.60.2014.04.13.23.37.05 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 13 Apr 2014 23:37:07 -0700 (PDT) From: Daeseok Youn To: clm@fb.com, jbacik@fb.com Cc: linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] btrfs: remove redundant null check in btrfs_dentry_release() Date: Mon, 14 Apr 2014 15:37:02 +0900 Message-ID: <3662362.sLylFx3ZAR@daeseok-laptop.cloud.net> User-Agent: KMail/4.8.5 (Linux/3.2.0-58-generic; KDE/4.8.5; x86_64; ; ) MIME-Version: 1.0 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, 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 It doesn't need to check NULL for kfree() Signed-off-by: Daeseok Youn --- fs/btrfs/inode.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 06e9a41..d9f54b0 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -5141,8 +5141,7 @@ static int btrfs_dentry_delete(const struct dentry *dentry) static void btrfs_dentry_release(struct dentry *dentry) { - if (dentry->d_fsdata) - kfree(dentry->d_fsdata); + kfree(dentry->d_fsdata); } static struct dentry *btrfs_lookup(struct inode *dir, struct dentry *dentry,