From patchwork Mon Oct 6 21:21:18 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andi Kleen X-Patchwork-Id: 2981 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.176.167]) by ozlabs.org (Postfix) with ESMTP id 51F57DDF02 for ; Tue, 7 Oct 2008 08:21:22 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752560AbYJFVVV (ORCPT ); Mon, 6 Oct 2008 17:21:21 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752618AbYJFVVU (ORCPT ); Mon, 6 Oct 2008 17:21:20 -0400 Received: from one.firstfloor.org ([213.235.205.2]:37045 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752560AbYJFVVU (ORCPT ); Mon, 6 Oct 2008 17:21:20 -0400 Received: from basil.firstfloor.org (f053156137.adsl.alicedsl.de [78.53.156.137]) by one.firstfloor.org (Postfix) with ESMTP id 82CB81AD0020; Mon, 6 Oct 2008 23:27:23 +0200 (CEST) Received: by basil.firstfloor.org (Postfix, from userid 1000) id DF8BD3E6A0B; Mon, 6 Oct 2008 23:21:18 +0200 (CEST) Date: Mon, 6 Oct 2008 23:21:18 +0200 From: Andi Kleen To: tytso@mit.edu, linux-ext4@vger.kernel.org Subject: [PATCH] EXT4: Avoid double dirtying of super block in ext4_put_super() Message-ID: <20081006212118.GA382@basil.nowhere.org> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.13 (2006-08-11) Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org EXT4: Avoid double dirtying of super block in ext4_put_super() While reading code I noticed that ext4_put_super() dirties the superblock bh twice. It is always done in ext4_commit_super() too. Remove the redundant dirty operation. Should be a nop semantically. Signed-off-by: Andi Kleen --- 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 -up linux-2.6.27-rc6-csum/fs/ext4/super.c-o linux-2.6.27-rc6-csum/fs/ext4/super.c --- linux-2.6.27-rc6-csum/fs/ext4/super.c-o 2008-08-29 10:10:08.000000000 +0200 +++ linux-2.6.27-rc6-csum/fs/ext4/super.c 2008-10-06 11:24:31.000000000 +0200 @@ -508,8 +509,6 @@ if (!(sb->s_flags & MS_RDONLY)) { EXT4_CLEAR_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_RECOVER); es->s_state = cpu_to_le16(sbi->s_mount_state); - BUFFER_TRACE(sbi->s_sbh, "marking dirty"); - mark_buffer_dirty(sbi->s_sbh); ext4_commit_super(sb, es, 1); }