Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sbin/umount Remove useless and harmful sync(2) call in umoun...



details:   https://anonhg.NetBSD.org/src/rev/fdaaa1a1a829
branches:  trunk
changeset: 339116:fdaaa1a1a829
user:      manu <manu%NetBSD.org@localhost>
date:      Sat Jun 27 08:29:56 2015 +0000

description:
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.

diffstat:

 sbin/umount/umount.c |  7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diffs (28 lines):

diff -r 87b2466e0fd6 -r fdaaa1a1a829 sbin/umount/umount.c
--- a/sbin/umount/umount.c      Sat Jun 27 08:07:46 2015 +0000
+++ b/sbin/umount/umount.c      Sat Jun 27 08:29:56 2015 +0000
@@ -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 @@
 #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 @@
 #endif /* SMALL */
        const char **typelist = NULL;
 
-       /* Start disks transferring immediately. */
-       sync();
-
 #ifdef SMALL
 #define OPTS "fR"
 #else



Home | Main Index | Thread Index | Old Index