List:Commits« Previous MessageNext Message »
From:Inaam Rana Date:June 6 2011 5:38pm
Subject:bzr push into mysql-trunk branch (inaam.rana:3161)
View as plain text  
 3161 Inaam Rana	2011-06-06 [merge]
      Merge from parent

    modified:
      storage/innobase/buf/buf0buf.c
=== modified file 'storage/innobase/buf/buf0lru.c'
--- a/storage/innobase/buf/buf0lru.c	revid:inaam.rana@stripped
+++ b/storage/innobase/buf/buf0lru.c	revid:inaam.rana@stripped
@@ -1473,7 +1473,8 @@ buf_LRU_free_block(
 	if (!buf_page_can_relocate(bpage)) {
 
 		/* Do not free buffer-fixed or I/O-fixed blocks. */
-		goto no_free_exit;
+		ret = BUF_LRU_NOT_FREED;
+		goto func_exit;
 	}
 
 #ifdef UNIV_IBUF_COUNT_DEBUG
@@ -1485,7 +1486,8 @@ buf_LRU_free_block(
 		/* Do not completely free dirty blocks. */
 
 		if (bpage->oldest_modification) {
-			goto no_free_exit;
+			ret = BUF_LRU_NOT_FREED;
+			goto func_exit;
 		}
 	} else if ((bpage->oldest_modification)
 		   && (buf_page_get_state(bpage)
@@ -1494,7 +1496,8 @@ buf_LRU_free_block(
 		ut_ad(buf_page_get_state(bpage)
 		      == BUF_BLOCK_ZIP_DIRTY);
 
-		goto no_free_exit;
+		ret = BUF_LRU_NOT_FREED;
+		goto func_exit;
 
 	} else if (buf_page_get_state(bpage) == BUF_BLOCK_FILE_PAGE) {
 
@@ -1512,24 +1515,29 @@ buf_LRU_free_block(
 		the block mutex. In that case we free the newly
 		allocated descriptor and return */
 		if (!buf_page_can_relocate(bpage)) {
+
+			rw_lock_x_unlock(hash_lock);
+			mutex_exit(block_mutex);
+
 			if (b) {
 				buf_buddy_free(buf_pool, b, sizeof(*b));
 			}
-no_free_exit:
-			ret = BUF_LRU_NOT_FREED;
+
+			return(BUF_LRU_NOT_FREED);
+		}
+
+		if (UNIV_UNLIKELY(!b)) {
+			ret = BUF_LRU_CANNOT_RELOCATE;
 func_exit:
 			rw_lock_x_unlock(hash_lock);
 			mutex_exit(block_mutex);
 			return(ret);
-		}
 
-		if (UNIV_UNLIKELY(!b)) {
-			ret = BUF_LRU_CANNOT_RELOCATE;
-			goto func_exit;
 		}
 
 		memcpy(b, bpage, sizeof *b);
 	}
+
 	ut_ad(buf_pool_mutex_own(buf_pool));
 	ut_ad(buf_page_in_file(bpage));
 	ut_ad(bpage->in_LRU_list);


Attachment: [text/bzr-bundle] bzr/inaam.rana@oracle.com-20110606173709-sbxrpcumoa0optjh.bundle
Thread
bzr push into mysql-trunk branch (inaam.rana:3161) Inaam Rana7 Jun