From 0fe42a6e2cd7252c5c12a5f4edb4c27789b0c043 Mon Sep 17 00:00:00 2001 From: "J. Bruce Fields" Date: Tue, 22 Dec 2009 13:02:08 -0500 Subject: [PATCH] mountd: don't require mountpoint in crossmnt case Currently, mount --bind /path /path where /path is a subdirectory of a crossmnt export, can cause client hangs, since the kernel detects that as a mountpoint, but nfs-util's is_mountpoint() function does not. I don't see any sure-fire way to detect such mountpoints. But that's OK: it's harmless to allow this upcall to succeed even when the directory is not a mountpoint, so let's just remove this check. Signed-off-by: J. Bruce Fields --- utils/mountd/cache.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/utils/mountd/cache.c b/utils/mountd/cache.c index e340390..2468bc5 100644 --- a/utils/mountd/cache.c +++ b/utils/mountd/cache.c @@ -619,8 +619,7 @@ static int is_subdirectory(char *subpath, char *path) int l = strlen(path); return strcmp(subpath, path) == 0 - || (strncmp(subpath, path, l) == 0 && path[l] == '/' - && is_mountpoint(path)); + || (strncmp(subpath, path, l) == 0 && path[l] == '/'); } static int path_matches(nfs_export *exp, char *path) -- 2.39.2