summaryrefslogtreecommitdiffstats
path: root/mdstat.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-07-25 06:14:23 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-07-25 06:14:23 +0000
commit201d885cf454e026cf59e18961f025bcfa8a3142 (patch)
treebaf91f410e825f7768de9be51fe5e8556333bc7b /mdstat.c
parentReleasing debian version 4.3+20240412-1. (diff)
downloadmdadm-201d885cf454e026cf59e18961f025bcfa8a3142.tar.xz
mdadm-201d885cf454e026cf59e18961f025bcfa8a3142.zip
Merging upstream version 4.3+20240723.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mdstat.c')
-rw-r--r--mdstat.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mdstat.c b/mdstat.c
index 2fd792c..e233f09 100644
--- a/mdstat.c
+++ b/mdstat.c
@@ -348,7 +348,8 @@ void mdstat_wait_fd(int fd, const sigset_t *sigmask)
if (fd >= 0) {
struct stat stb;
- fstat(fd, &stb);
+ if (fstat(fd, &stb) != 0)
+ return;
if ((stb.st_mode & S_IFMT) == S_IFREG)
/* Must be a /proc or /sys fd, so expect
* POLLPRI