[PATCH v2] rpc.idmapd: nfsopen() failures should not be fatal

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx>
Closes: https://lore.kernel.org/linux-nfs/ZmCB_zqdu2cynJ1M@xxxxxxxxxxx/
Link: https://bugs.debian.org/1072573
Patch-originally-by: Sergio Gelato <sergio.gelato@xxxxxxxxxxx>
Signed-off-by: Salvatore Bonaccorso <carnil@xxxxxxxxxx>
---
Changes in v2:
- Fix typo in URL for Debian bug reference
- Reorder patch tags and use Closes tag after Reported-by

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





[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux