linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 11/33] fix: IncrementalRemove leaves open handle
       [not found] <A9DE54D0CD747C4CB06DCE5B6FA2246FDA893C0C@irsmsx504.ger.corp.intel.com>
@ 2010-07-05 10:45 ` Hawrylewicz Czarnowski, Przemyslaw
  2010-07-06  6:48 ` Neil Brown
  1 sibling, 0 replies; 2+ messages in thread
From: Hawrylewicz Czarnowski, Przemyslaw @ 2010-07-05 10:45 UTC (permalink / raw)
  To: linux-raid@vger.kernel.org

From: Czarnowska, Anna 
Sent: Monday, July 05, 2010 11:24 AM
To: Neil Brown
Cc: linux-raid@vger.kernel.org; Czarnowska, Anna; Hawrylewicz Czarnowski, Przemyslaw; Labun, Marcin; Neubauer, Wojciech; Williams, Dan J; Ciechanowski, Ed; dledford@redhat.com
Subject: [PATCH 11/33] fix: IncrementalRemove leaves open handle

From: Przemyslaw Czarnowski <przemyslaw.hawrylewicz.czarnowski@intel.com>

Signed-off-by: Przemyslaw Czarnowski <przemyslaw.hawrylewicz.czarnowski@intel.com>
---
 Incremental.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/Incremental.c b/Incremental.c index 3501bc1..4455a89 100644
--- a/Incremental.c
+++ b/Incremental.c
@@ -866,6 +866,7 @@ int Incremental_container(struct supertype *st, char *devname, int verbose,  int IncrementalRemove(char *devname, int verbose)  {
      int mdfd;
+     int rv;
      struct mdstat_ent *ent;
      struct mddev_dev_s devlist;
 
@@ -890,7 +891,9 @@ int IncrementalRemove(char *devname, int verbose)
      devlist.disposition = 'f';
      Manage_subdevs(ent->dev, mdfd, &devlist, verbose);
      devlist.disposition = 'r';
-     return Manage_subdevs(ent->dev, mdfd, &devlist, verbose);
+     rv = Manage_subdevs(ent->dev, mdfd, &devlist, verbose);
+     close(mdfd);
+     return rv;
 }
 
 /*
--
1.6.4.2


--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 11/33] fix: IncrementalRemove leaves open handle
       [not found] <A9DE54D0CD747C4CB06DCE5B6FA2246FDA893C0C@irsmsx504.ger.corp.intel.com>
  2010-07-05 10:45 ` [PATCH 11/33] fix: IncrementalRemove leaves open handle Hawrylewicz Czarnowski, Przemyslaw
@ 2010-07-06  6:48 ` Neil Brown
  1 sibling, 0 replies; 2+ messages in thread
From: Neil Brown @ 2010-07-06  6:48 UTC (permalink / raw)
  To: Czarnowska, Anna
  Cc: linux-raid@vger.kernel.org, Hawrylewicz Czarnowski, Przemyslaw,
	Labun, Marcin, Neubauer, Wojciech, Williams, Dan J,
	Ciechanowski, Ed, dledford@redhat.com

On Mon, 5 Jul 2010 10:23:52 +0100
"Czarnowska, Anna" <anna.czarnowska@intel.com> wrote:

> From: Przemyslaw Czarnowski <przemyslaw.hawrylewicz.czarnowski@intel.com>
> 
> 
> 
> Signed-off-by: Przemyslaw Czarnowski <przemyslaw.hawrylewicz.czarnowski@intel.com<mailto:przemyslaw.hawrylewicz.czarnowski@intel.com>>
> 
> ---
> 
>  Incremental.c |    5 ++++-
> 
>  1 files changed, 4 insertions(+), 1 deletions(-)
> 
> 
> 
> diff --git a/Incremental.c b/Incremental.c index 3501bc1..4455a89 100644
> 
> --- a/Incremental.c
> 
> +++ b/Incremental.c
> 
> @@ -866,6 +866,7 @@ int Incremental_container(struct supertype *st, char *devname, int verbose,  int IncrementalRemove(char *devname, int verbose)  {
> 
>       int mdfd;
> 
> +     int rv;
> 
>       struct mdstat_ent *ent;
> 
>       struct mddev_dev_s devlist;
> 
> 
> 
> @@ -890,7 +891,9 @@ int IncrementalRemove(char *devname, int verbose)
> 
>       devlist.disposition = 'f';
> 
>       Manage_subdevs(ent->dev, mdfd, &devlist, verbose);
> 
>       devlist.disposition = 'r';
> 
> -     return Manage_subdevs(ent->dev, mdfd, &devlist, verbose);
> 
> +     rv = Manage_subdevs(ent->dev, mdfd, &devlist, verbose);
> 
> +     close(mdfd);
> 
> +     return rv;

All of these patches are formatted rather badly with lots of blank lines.

However this is simple and correct so I have applied this one by hand.

Thanks,
NeilBrown


> 
>  }
> 
> 
> 
>  /*
> 
> --
> 
> 1.6.4.2
> 
> 
> 
> ---------------------------------------------------------------------
> Intel Technology Poland sp. z o.o.
> z siedziba w Gdansku
> ul. Slowackiego 173
> 80-298 Gdansk
> 
> Sad Rejonowy Gdansk Polnoc w Gdansku, 
> VII Wydzial Gospodarczy Krajowego Rejestru Sadowego, 
> numer KRS 101882
> 
> NIP 957-07-52-316
> Kapital zakladowy 200.000 zl
> 
> This e-mail and any attachments may contain confidential material for
> the sole use of the intended recipient(s). Any review or distribution
> by others is strictly prohibited. If you are not the intended
> recipient, please contact the sender and delete all copies.


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

end of thread, other threads:[~2010-07-06  6:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <A9DE54D0CD747C4CB06DCE5B6FA2246FDA893C0C@irsmsx504.ger.corp.intel.com>
2010-07-05 10:45 ` [PATCH 11/33] fix: IncrementalRemove leaves open handle Hawrylewicz Czarnowski, Przemyslaw
2010-07-06  6:48 ` Neil Brown

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).