diff mbox series

[LEDE-DEV,mountd,1/2] mount: drop duplicated unlink() call from the mount_dev_del()

Message ID 20180212110153.4432-1-zajec5@gmail.com
State Accepted
Delegated to: Rafał Miłecki
Headers show
Series [LEDE-DEV,mountd,1/2] mount: drop duplicated unlink() call from the mount_dev_del() | expand

Commit Message

Rafał Miłecki Feb. 12, 2018, 11:01 a.m. UTC
From: Rafał Miłecki <rafal@milecki.pl>

There is no need to call unlink() there as mount_enum_drives() does it
too, soon after calling mount_dev_del(). Also mount_enum_drives() does
that for STATUS_EXPIRED - which is expected - as there is no unlink()
call when device expires.

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

Patch

diff --git a/mount.c b/mount.c
index f196791..aa346ff 100644
--- a/mount.c
+++ b/mount.c
@@ -591,8 +591,6 @@  static void mount_dev_del(struct mount *mount)
 		log_printf("device %s has disappeared ... unmounting %s\n", mount->dev, tmp);
 		system_printf("/bin/umount %s", tmp);
 		rmdir(tmp);
-		snprintf(tmp, 64, "%s%s", uci_path, mount->name);
-		unlink(tmp);
 		mount_dump_uci_state();
 	}
 }