summaryrefslogtreecommitdiffstats
path: root/sbin/umount
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/umount')
-rw-r--r--sbin/umount/umount.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sbin/umount/umount.c b/sbin/umount/umount.c
index 911666f..9b75449 100644
--- a/sbin/umount/umount.c
+++ b/sbin/umount/umount.c
@@ -90,9 +90,6 @@ main(int argc, char *argv[])
struct statfs *mntbuf, *sfs;
struct addrinfo hints;
- /* Start disks transferring immediately. */
- sync();
-
all = errs = 0;
while ((ch = getopt(argc, argv, "AaF:fh:t:v")) != -1)
switch (ch) {
@@ -127,6 +124,10 @@ main(int argc, char *argv[])
argc -= optind;
argv += optind;
+ /* Start disks transferring immediately. */
+ if ((fflag & MNT_FORCE) == 0)
+ sync();
+
if ((argc == 0 && !all) || (argc != 0 && all))
usage();
OpenPOWER on IntegriCloud