From: J. Bruce Fields Date: Tue, 22 Dec 2009 18:02:08 +0000 (-0500) Subject: mountd: don't require mountpoint in crossmnt case X-Git-Tag: nfs-utils-1-2-2-rc6~18 X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=commitdiff_plain;h=0fe42a6e2cd7252c5c12a5f4edb4c27789b0c043;ds=sidebyside 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 --- 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)