From patchwork Fri Aug 26 09:19:31 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 111730 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 62D1CB6EE8 for ; Fri, 26 Aug 2011 19:22:06 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754381Ab1HZJWA (ORCPT ); Fri, 26 Aug 2011 05:22:00 -0400 Received: from mail-pz0-f42.google.com ([209.85.210.42]:34795 "EHLO mail-pz0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754114Ab1HZJVt (ORCPT ); Fri, 26 Aug 2011 05:21:49 -0400 Received: by pzk37 with SMTP id 37so3956660pzk.1 for ; Fri, 26 Aug 2011 02:21:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=03D3ABUw+kLzEVgS/+Cp3jZ8s8YUYfrrUXx7iu6CGRs=; b=UXrJlt/cdvQDEhHUDsRZvzbjJBXPm57j2SbJhP+O8FzaATBIzY/elt/QgYZobxVcxf P138y7uUjGJvv4NQ+V/Kbv6A5nH3nSi23u47W0z9vstt3vHGNeIMPh8F1iDFP5Zy5a7Q +7o9AsSxlA97T716PeUBUHbBplfVHjWRZC0w4= Received: by 10.142.191.5 with SMTP id o5mr439221wff.262.1314350508854; Fri, 26 Aug 2011 02:21:48 -0700 (PDT) Received: from shale.localdomain ([41.139.221.94]) by mx.google.com with ESMTPS id s8sm1410658wff.5.2011.08.26.02.21.44 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 26 Aug 2011 02:21:47 -0700 (PDT) Date: Fri, 26 Aug 2011 12:19:31 +0300 From: Dan Carpenter To: Theodore Ts'o Cc: "open list:JOURNALLING LAYER..." , kernel-janitors@vger.kernel.org Subject: [patch 1/2] jbd2: remove an unneeded NULL check Message-ID: <20110826091931.GM5975@shale.localdomain> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org We dereference "transaction" at the start of the function so the NULL check isn't needed here. It's not harmful, but it silences a static checker warning when we remove this. Signed-off-by: Dan Carpenter --- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c index a242f6f..8d7013c 100644 --- a/fs/jbd2/transaction.c +++ b/fs/jbd2/transaction.c @@ -1143,8 +1143,7 @@ int jbd2_journal_dirty_metadata(handle_t *handle, struct buffer_head *bh) jh->b_next_transaction, jh->b_next_transaction ? jh->b_next_transaction->t_tid : 0, - transaction, - transaction ? transaction->t_tid : 0); + transaction, transaction->t_tid); BUG_ON(1); } /* And this case is illegal: we can't reuse another