public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: tytso@mit.edu, linux-ext4@vger.kernel.org
Subject: [PATCH] EXT4: Avoid double dirtying of super block in ext4_put_super()
Date: Mon, 6 Oct 2008 23:21:18 +0200	[thread overview]
Message-ID: <20081006212118.GA382@basil.nowhere.org> (raw)

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 <ak@linux.intel.com>

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);
 	}
 

             reply	other threads:[~2008-10-06 21:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-06 21:21 Andi Kleen [this message]
2008-10-06 23:39 ` [PATCH] EXT4: Avoid double dirtying of super block in ext4_put_super() Theodore Tso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081006212118.GA382@basil.nowhere.org \
    --to=andi@firstfloor.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox