Whamcloud - gitweb
Speed up journal recovery in userspace by avoiding a pointless
[tools/e2fsprogs.git] / lib / ext2fs / closefs.c
index 69a769f..f52c343 100644 (file)
@@ -91,6 +91,7 @@ static errcode_t write_primary_superblock(ext2_filsys fs,
                if (retval)
                        return retval;
        }
+       memcpy(fs->orig_super, super, SUPERBLOCK_SIZE);
        return 0;
 }
 
@@ -251,6 +252,8 @@ errcode_t ext2fs_flush(ext2_filsys fs)
                        goto errout;
        }
 
+       fs->flags &= ~EXT2_FLAG_DIRTY;
+
        /*
         * Flush the blocks out to disk
         */