diff --git a/innobase/buf/buf0flu.c b/innobase/buf/buf0flu.c
index ffb16790b2d9f7df5933901aca37aa664b750388..e39d1ae0a7116a97f50fabe8cf7c8746ea9f75bb 100644
--- a/innobase/buf/buf0flu.c
+++ b/innobase/buf/buf0flu.c
@@ -230,7 +230,7 @@ buf_flush_buffered_writes(void)
 	ulint		len2;
 	ulint		i;
 
-	if (trx_doublewrite == NULL) {
+	if (!srv_use_doublewrite_buf || trx_doublewrite == NULL) {
 		os_aio_simulated_wake_handler_threads();
 
 		return;
@@ -503,7 +503,7 @@ buf_flush_write_block_low(
 #endif	
 	buf_flush_init_for_writing(block->frame, block->newest_modification,
 						block->space, block->offset);
-	if (!trx_doublewrite) {
+	if (!srv_use_doublewrite_buf || !trx_doublewrite) {
 		fil_io(OS_FILE_WRITE | OS_AIO_SIMULATED_WAKE_LATER,
 			FALSE, block->space, block->offset, 0, UNIV_PAGE_SIZE,
 		 			(void*)block->frame, (void*)block);
diff --git a/innobase/srv/srv0start.c b/innobase/srv/srv0start.c
index 325b0a109cf660f017ae6de141d54679bf8062d8..e5151ebf631d45468b87b4ad45fef4373d505b10 100644
--- a/innobase/srv/srv0start.c
+++ b/innobase/srv/srv0start.c
@@ -1540,7 +1540,7 @@ NetWare. */
 #endif
 	sync_order_checks_on = TRUE;
 
-        if (srv_use_doublewrite_buf && trx_doublewrite == NULL) {
+        if (trx_doublewrite == NULL) {
 		/* Create the doublewrite buffer to a new tablespace */
 
 		trx_sys_create_doublewrite_buf();
diff --git a/innobase/trx/trx0sys.c b/innobase/trx/trx0sys.c
index bf48c30e9428dea47b4537356673c254f5644814..23f1dc40d00133cb67fc84ad5ec7a83be8369375 100644
--- a/innobase/trx/trx0sys.c
+++ b/innobase/trx/trx0sys.c
@@ -125,22 +125,6 @@ trx_doublewrite_init(
 					* sizeof(void*));
 }
 
-/********************************************************************
-Frees the doublewrite buffer. */
-static
-void
-trx_doublewrite_free(void)
-/*======================*/
-{
-  mutex_free(&(trx_doublewrite->mutex));
-
-  mem_free(trx_doublewrite->buf_block_arr);
-  ut_free(trx_doublewrite->write_buf_unaligned);
-
-  mem_free(trx_doublewrite);
-  trx_doublewrite = NULL;
-}
-
 /********************************************************************
 Marks the trx sys header when we have successfully upgraded to the >= 4.1.x
 multiple tablespace format. */
@@ -529,9 +513,6 @@ trx_sys_doublewrite_init_or_restore_pages(
 
 	fil_flush_file_spaces(FIL_TABLESPACE);
 	
-  if (!srv_use_doublewrite_buf)
-    trx_doublewrite_free();
-
 leave_func:
 	ut_free(unaligned_read_buf);
 }