[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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



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|#`PPá 1



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]