diff mbox series

[LEDE-DEV,mountd] autofs: don't check if /tmp/run/mountd/ mount point exists

Message ID 20180208175536.9628-1-zajec5@gmail.com
State Accepted
Delegated to: Rafał Miłecki
Headers show
Series [LEDE-DEV,mountd] autofs: don't check if /tmp/run/mountd/ mount point exists | expand

Commit Message

Rafał Miłecki Feb. 8, 2018, 5:55 p.m. UTC
From: Rafał Miłecki <rafal@milecki.pl>

First of all this check was never working. Mount points are stored
without trailing slash so passing "/tmp/run/mountd/" as argument was a
mistake.

This could get fixed but that would make mountd refuse to start in
situations people used to have it working. When stopping mountd with
some devices mounted in the /tmp/run/mountd/ umount_autofs() won't be
able to unmount it (umount will return 256). This isn't critical
thought as new mountd instance can just mount aufofs again (using the
same mount point and its own pipefd).

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
 autofs.c | 5 -----
 1 file changed, 5 deletions(-)
diff mbox series

Patch

diff --git a/autofs.c b/autofs.c
index a898f49..fd37f1f 100644
--- a/autofs.c
+++ b/autofs.c
@@ -48,11 +48,6 @@  static int mount_autofs(void)
 	int pipefd[2];
 	struct stat st;
 	log_printf("trying to mount %s as the autofs root\n", "/tmp/run/mountd/");
-	if(is_mounted(0, "/tmp/run/mountd/"))
-	{
-		log_printf("%s is already mounted\n", "/tmp/run/mountd/");
-		return -1;
-	}
 	fdout = fdin = -1;
 	mkdir("/tmp/run/mountd/", 0555);
 	if(pipe(pipefd) < 0)