Thread (5 messages) 5 messages, 2 authors, 2013-07-26

Re: mdadm -Db switches array to write-pending?!

From: Martin Wilck <hidden>
Date: 2013-07-17 20:19:25

On 07/15/2013 07:18 AM, NeilBrown wrote:
quoted hunk ↗ jump to hunk
Probably the  best thing to do is:
diff --git a/drivers/md/md.c b/drivers/md/md.c
index d059af5..b19a1c8 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -5629,10 +5629,7 @@ static int get_bitmap_file(struct mddev * mddev, void __user * arg)
 	char *ptr, *buf = NULL;
 	int err = -ENOMEM;
 
-	if (md_allow_write(mddev))
-		file = kmalloc(sizeof(*file), GFP_NOIO);
-	else
-		file = kmalloc(sizeof(*file), GFP_KERNEL);
+	file = kmalloc(sizeof(*file), GFP_NOIO);
 
 	if (!file)
 		goto out;

A failure here is not likely and not catastrophic.

Does it fix the situation for you?
Yes it does.
Martin
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help