From owner-svn-src-head@FreeBSD.ORG Fri Oct 10 03:20:13 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7D748335; Fri, 10 Oct 2014 03:20:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6AC2A6CD; Fri, 10 Oct 2014 03:20:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9A3KDqk088066; Fri, 10 Oct 2014 03:20:13 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9A3KDKB088065; Fri, 10 Oct 2014 03:20:13 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201410100320.s9A3KDKB088065@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Fri, 10 Oct 2014 03:20:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272885 - head/sbin/swapon X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Oct 2014 03:20:13 -0000 Author: hrs Date: Fri Oct 10 03:20:12 2014 New Revision: 272885 URL: https://svnweb.freebsd.org/changeset/base/272885 Log: Do not add late flag when file= is specified because it has a bad side-effect. The specified file should exist before the fstab line. Reported by: wblock (long time ago) MFC after: 1 day Modified: head/sbin/swapon/swapon.c Modified: head/sbin/swapon/swapon.c ============================================================================== --- head/sbin/swapon/swapon.c Fri Oct 10 03:05:55 2014 (r272884) +++ head/sbin/swapon/swapon.c Fri Oct 10 03:20:12 2014 (r272885) @@ -172,15 +172,8 @@ main(int argc, char **argv) continue; if (strstr(fsp->fs_mntops, "noauto") != NULL) continue; - /* - * Forcibly enable "late" option when file= is - * specified. This is because mounting file - * systems with rw option is typically - * required to make the backing store ready. - */ if (which_prog != SWAPOFF && - (strstr(fsp->fs_mntops, "late") != NULL || - strstr(fsp->fs_mntops, "file=") != NULL) && + strstr(fsp->fs_mntops, "late") && late == 0) continue; swfile = swap_on_off(fsp->fs_spec, 1,