From 5edd472129e9a5d0de817414680429c0edc7a867 Mon Sep 17 00:00:00 2001 From: hrs Date: Sat, 11 Oct 2014 20:35:36 +0000 Subject: [PATCH] MFC r272885: 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. git-svn-id: svn://svn.freebsd.org/base/stable/10@272960 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- sbin/swapon/swapon.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/sbin/swapon/swapon.c b/sbin/swapon/swapon.c index 5c6086d9b..033c40a8e 100644 --- a/sbin/swapon/swapon.c +++ b/sbin/swapon/swapon.c @@ -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, -- 2.45.0