Module Name:    src
Committed By:   manu
Date:           Sat Jun 27 08:29:56 UTC 2015

Modified Files:
        src/sbin/umount: umount.c

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sbin/umount/umount.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/umount/umount.c
diff -u src/sbin/umount/umount.c:1.47 src/sbin/umount/umount.c:1.48
--- src/sbin/umount/umount.c:1.47	Tue Jul  2 01:39:17 2013
+++ src/sbin/umount/umount.c	Sat Jun 27 08:29:56 2015
@@ -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, 19
 #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

Reply via email to