[dm-devel] [PATCH] kcopyd.c : Unlock locked pages on init_pages() error path

Kevin Corry corryk at us.ibm.com
Tue Jan 7 15:49:02 UTC 2003


If an alloc_page() call fails in init_pages(), unlock all locked
pages before freeing them.

--- linux-2.4.20a/drivers/md/kcopyd.c	2002/12/31 14:59:10
+++ linux-2.4.20b/drivers/md/kcopyd.c	2003/01/07 20:50:42
@@ -59,8 +59,10 @@
 	return 0;
 
       bad:
-	while (i--)
+	while (i--) {
+		UnlockPage(_pages_array[i]);
 		__free_page(_pages_array[i]);
+	}
 	return -ENOMEM;
 }
á@`y|#`P
Pá@1




More information about the dm-devel mailing list