From owner-svn-src-all@freebsd.org Thu Sep 13 13:57:43 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 391CB108EBAE; Thu, 13 Sep 2018 13:57:43 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E472B722B8; Thu, 13 Sep 2018 13:57:42 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DF4C116693; Thu, 13 Sep 2018 13:57:42 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8DDvgO2032728; Thu, 13 Sep 2018 13:57:42 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8DDvgx0032727; Thu, 13 Sep 2018 13:57:42 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201809131357.w8DDvgx0032727@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Thu, 13 Sep 2018 13:57:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338639 - head/sbin/umount X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sbin/umount X-SVN-Commit-Revision: 338639 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Sep 2018 13:57:43 -0000 Author: mjg Date: Thu Sep 13 13:57:42 2018 New Revision: 338639 URL: https://svnweb.freebsd.org/changeset/base/338639 Log: 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 Modified: head/sbin/umount/umount.c Modified: head/sbin/umount/umount.c ============================================================================== --- head/sbin/umount/umount.c Thu Sep 13 10:18:50 2018 (r338638) +++ head/sbin/umount/umount.c Thu Sep 13 13:57:42 2018 (r338639) @@ -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();