From patchwork Sat May 29 09:45:08 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 103025 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 o4T9jUXL026668 for ; Sat, 29 May 2010 09:45:30 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754907Ab0E2Jp2 (ORCPT ); Sat, 29 May 2010 05:45:28 -0400 Received: from mail-ew0-f216.google.com ([209.85.219.216]:47178 "EHLO mail-ew0-f216.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751327Ab0E2Jp1 (ORCPT ); Sat, 29 May 2010 05:45:27 -0400 Received: by ewy8 with SMTP id 8so554970ewy.28 for ; Sat, 29 May 2010 02:45:25 -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:mime-version:content-type:content-disposition:user-agent; bh=rbcLPFhOnWz/4wVhr0FNXbpZ0t77HSeWsr0Ii+CJWlc=; b=wx/vHsNZKHI/XbEW44/IEKcL83iSpHgOh6HBJY1NgL6O/WwhI0k0HbSHcxnnuMqHID 1MapPbShqOf19PRKcJ5UJpmBnlrf4R/yecZkwAec/ZyTcgkq68w4oxdUf8u7e7ShokRJ rdwe7QotPw4PlWCUj8/C1+usjq7mCrbWkdtew= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=b2S1kGUo7DVMjzj9Y6QN/js8vcCe3qG53gHZHXIHeGP2f2MqME2YRZwR72dOLcSOk1 udanpxFsRS/9Xn6bcw+cUKjfPLMz5lP7fqyYXOEAZREhHDtQJfsJXSPQV1kQ+tJRp1XD wDo4jSZFi3ZdFKZa0LONGHOjiriFXkrokPV+4= Received: by 10.213.6.212 with SMTP id a20mr781885eba.85.1275126325454; Sat, 29 May 2010 02:45:25 -0700 (PDT) Received: from bicker ([205.177.176.130]) by mx.google.com with ESMTPS id 13sm1697140ewy.13.2010.05.29.02.45.17 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 29 May 2010 02:45:25 -0700 (PDT) Date: Sat, 29 May 2010 11:45:08 +0200 From: Dan Carpenter To: linux-btrfs@vger.kernel.org Cc: Yan Zheng , Josef Bacik , Al Viro , Chris Mason , kernel-janitors@vger.kernel.org Subject: [patch 5/11] btrfs: remove unneeded null check in btrfs_rename() Message-ID: <20100529094508.GF5483@bicker> 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, 29 May 2010 09:45:30 +0000 (UTC) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index fa6ccc1..0bc29be 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -6487,10 +6487,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;