On Thu, 9 Jun 2022 15:11:20 -0600
Logan Gunthorpe [off-list ref] wrote:
quoted hunk ↗ jump to hunk
---
Grow.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Grow.c b/Grow.c
index 8a242b0f8725..ba5dc1aead64 100644
--- a/Grow.c
+++ b/Grow.c
@@ -3506,7 +3506,6 @@ started:
return 0;
}
- close(fd);
/* Now we just need to kick off the reshape and watch, while
* handling backups of the data...
* This is all done by a forked background process.
@@ -3527,6 +3526,9 @@ started:
break;
}
+ /* Close unused file descriptor in the forked process */
+ close(fd);
+
/* If another array on the same devices is busy, the
* reshape will wait for them. This would mean that
* the first section that we suspend will stay suspended
Please use close_fd() helper to invalidate fd too.