Skip to content

Commit

Permalink
ext2: write superblock only once on unmount
Browse files Browse the repository at this point in the history
Currently on unmount if we are mounted R/W, we first write the superblock to
the media if it is dirty, and then write it again, which is not optimal. This
patch makes ext2 write the superblock on unmount less times.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: Jan Kara <jack@suse.cz>
  • Loading branch information
dedekind authored and jankara committed Apr 11, 2012
1 parent ee65244 commit f2b2242
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions fs/ext2/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,6 @@ static void ext2_put_super (struct super_block * sb)

dquot_disable(sb, -1, DQUOT_USAGE_ENABLED | DQUOT_LIMITS_ENABLED);

if (sb->s_dirt)
ext2_write_super(sb);

ext2_xattr_put_super(sb);
if (!(sb->s_flags & MS_RDONLY)) {
struct ext2_super_block *es = sbi->s_es;
Expand Down

0 comments on commit f2b2242

Please sign in to comment.