File 0007-rpc.idmapd-nfsopen-failures-should-not-be-fatal.patch of Package nfs-utils.37854
From fdc5081a8f48dd161ea94fff11bf0afd8d901747 Mon Sep 17 00:00:00 2001
From: Salvatore Bonaccorso <carnil@debian.org>
Date: Fri, 20 Sep 2024 12:30:07 -0400
Subject: rpc.idmapd: nfsopen() failures should not be fatal
Git-commit: fdc5081a8f48dd161ea94fff11bf0afd8d901747
Patch-mainline: nfs-utils-2-7-2-rc1
References: bsc#1239165
dirscancb() loops over all clnt* subdirectories of /run/rpc_pipefs/nfs/.
Some of these directories contain /idmap files, others don't. nfsopen()
returns -1 for the latter; we then want to skip the directory, not abort
the entire scan.
Reported-by: Sergio Gelato <sergio.gelato@astro.su.se>
Closes: https://lore.kernel.org/linux-nfs/ZmCB_zqdu2cynJ1M@astro.su.se/
Link: https://bugs.debian.org/1072573
Patch-originally-by: Sergio Gelato <sergio.gelato@astro.su.se>
Signed-off-by: Salvatore Bonaccorso <carnil@debian.org>
Signed-off-by: Steve Dickson <steved@redhat.com>
Acked-by: Anthony Iliopoulos <ailiop@suse.com>
---
utils/idmapd/idmapd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/utils/idmapd/idmapd.c b/utils/idmapd/idmapd.c
index cd9a965f8fbc..5231f56d24a8 100644
--- a/utils/idmapd/idmapd.c
+++ b/utils/idmapd/idmapd.c
@@ -556,7 +556,7 @@ dirscancb(int fd, short UNUSED(which), void *data)
if (nfsopen(ic) == -1) {
close(ic->ic_dirfd);
free(ic);
- goto out;
+ continue;
}
if (verbose > 2)
--
2.47.0