linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] missing close in mdassemble
@ 2006-09-13 14:57 Luca Berra
  2006-09-15  6:56 ` Luca Berra
  0 siblings, 1 reply; 2+ messages in thread
From: Luca Berra @ 2006-09-13 14:57 UTC (permalink / raw)
  To: linux-raid; +Cc: neilb

[-- Attachment #1: Type: text/plain, Size: 272 bytes --]

attached, please apply
without this mdassemble cannot activate stacked arrays, i wonder how i
managed to miss it :(

L.

-- 
Luca Berra -- bluca@comedia.it
        Communication Media & Services S.r.l.
 /"\
 \ /     ASCII RIBBON CAMPAIGN
  X        AGAINST HTML MAIL
 / \

[-- Attachment #2: mdadm-2.5.3-closefd.patch --]
[-- Type: text/plain, Size: 537 bytes --]

--- mdadm-2.5.3/mdassemble.c.close	2006-09-13 12:28:00.000000000 +0200
+++ mdadm-2.5.3/mdassemble.c	2006-09-13 12:30:24.000000000 +0200
@@ -91,13 +91,12 @@
 				rv |= 1;
 				continue;
 			}
-			if (ioctl(mdfd, GET_ARRAY_INFO, &array)>=0)
-				/* already assembled, skip */
-				continue;
+			if (ioctl(mdfd, GET_ARRAY_INFO, &array) < 0)
 			rv |= Assemble(array_list->st, array_list->devname, mdfd,
 					   array_list,
 					   NULL, NULL,
 					   readonly, runstop, NULL, NULL, verbose, force);
+			close(mdfd);
 		}
 	return rv;
 }

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-09-15  6:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-13 14:57 [PATCH] missing close in mdassemble Luca Berra
2006-09-15  6:56 ` Luca Berra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).