From patchwork Sat Mar 20 11:37:52 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 87104 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o2KBcWoe009161 for ; Sat, 20 Mar 2010 11:38:33 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752196Ab0CTLiH (ORCPT ); Sat, 20 Mar 2010 07:38:07 -0400 Received: from mail-bw0-f209.google.com ([209.85.218.209]:46328 "EHLO mail-bw0-f209.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752163Ab0CTLiC (ORCPT ); Sat, 20 Mar 2010 07:38:02 -0400 Received: by mail-bw0-f209.google.com with SMTP id 1so664591bwz.21 for ; Sat, 20 Mar 2010 04:38:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:mail-followup-to:mime-version:content-type :content-disposition:user-agent; bh=55YEUkcipM5ZV65K3vRK91VimF4jxiNQNU0oi3B/Wv0=; b=UidyLSJ5bpjRiUgcCdXztojxxWRGYMtMT5HK5j+tSqYujQQ52zCcXma6N/2dZ5IZ3A yWT2DAdmhqhFEKL84yNVLZvuhOxOiYvaCgH8i5Au39V6Cd0Kig1Fy8DWYRHPawiM0esL eQ3fj1fLoZj2bPWvEuqzKmzhtdC0Z72N79g3I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mail-followup-to:mime-version :content-type:content-disposition:user-agent; b=SNxY7eltHmnS4Qt9KmqpSj1ulaaoj+IgQVAIRYt9jTFhYBIaYI3/4jbpKyCVsJjjif D0a7rOJWRXt7soE4AxzHxHNDmmHSBJ1BJDpYXSjdgtpDtqlcGXbBqBgD+umXxCPOTyri JGxvKX0xkiNaT0/qTHsTrj3JgS7Lt122XWpwc= Received: by 10.204.33.215 with SMTP id i23mr1289598bkd.86.1269085080386; Sat, 20 Mar 2010 04:38:00 -0700 (PDT) Received: from bicker ([196.43.68.49]) by mx.google.com with ESMTPS id s17sm9059773bkd.16.2010.03.20.04.37.57 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 20 Mar 2010 04:37:59 -0700 (PDT) Date: Sat, 20 Mar 2010 14:37:52 +0300 From: Dan Carpenter To: Chris Mason Cc: Josef Bacik , Yan Zheng , Andrew Morton , linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [patch 3/3] btrfs cleanup: unneeded null check Message-ID: <20100320113752.GA5331@bicker> Mail-Followup-To: Dan Carpenter , Chris Mason , Josef Bacik , Yan Zheng , Andrew Morton , linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Sat, 20 Mar 2010 11:38:33 +0000 (UTC) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 02bb099..647ce41 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -5541,10 +5541,8 @@ static int btrfs_rename(struct inode *old_dir, struct dentry *old_dentry, * make sure the inode gets flushed if it is replacing * something. */ - if (new_inode && new_inode->i_size && - old_inode && S_ISREG(old_inode->i_mode)) { + if (new_inode && new_inode->i_size && S_ISREG(old_inode->i_mode)) btrfs_add_ordered_operation(trans, root, old_inode); - } old_dir->i_ctime = old_dir->i_mtime = ctime; new_dir->i_ctime = new_dir->i_mtime = ctime;