Remove useless and harmful sync(2) call in umount(8)

Remove sync(2) call before unmount(2) in umount(8). This sync(2) is useless
since unmount(2) will perform a VFS_SYNC anyway.

But moreover, this sync(2) may be harmful, as there are some situation where
it cannot return (unreachable NFS server, for instance), causing umount -f
to be uneffective.
This commit is contained in:
manu 2015-06-27 08:29:56 +00:00
parent 8d2578da11
commit 123566befd
1 changed files with 2 additions and 5 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: umount.c,v 1.47 2013/07/02 01:39:17 christos Exp $ */
/* $NetBSD: umount.c,v 1.48 2015/06/27 08:29:56 manu Exp $ */
/*-
* Copyright (c) 1980, 1989, 1993
@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1989, 1993\
#if 0
static char sccsid[] = "@(#)umount.c 8.8 (Berkeley) 5/8/95";
#else
__RCSID("$NetBSD: umount.c,v 1.47 2013/07/02 01:39:17 christos Exp $");
__RCSID("$NetBSD: umount.c,v 1.48 2015/06/27 08:29:56 manu Exp $");
#endif
#endif /* not lint */
@ -96,9 +96,6 @@ main(int argc, char *argv[])
#endif /* SMALL */
const char **typelist = NULL;
/* Start disks transferring immediately. */
sync();
#ifdef SMALL
#define OPTS "fR"
#else