From 9696ba7fc0403b54e68788ed8c81b8f9ba033a33 Mon Sep 17 00:00:00 2001 From: Mateusz Guzik Date: Thu, 13 Sep 2018 13:57:42 +0000 Subject: [PATCH] umount: remove sync(2) call when used with -f It completely unnecessarily iterates over all filesystems and happens to be executed a lot e.g. by synth. Reviewed by: kib Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D17143 --- sbin/umount/umount.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sbin/umount/umount.c b/sbin/umount/umount.c index 9e8c71d0f1f6..b936c9dc174a 100644 --- a/sbin/umount/umount.c +++ b/sbin/umount/umount.c @@ -136,10 +136,6 @@ main(int argc, char *argv[]) if ((fflag & MNT_FORCE) != 0 && (fflag & MNT_NONBUSY) != 0) err(1, "-f and -n are mutually exclusive"); - /* Start disks transferring immediately. */ - if ((fflag & (MNT_FORCE | MNT_NONBUSY)) == 0 && nfsforce == 0) - sync(); - if ((argc == 0 && !all) || (argc != 0 && all)) usage();