Module Name:    src
Committed By:   bad
Date:           Sun Aug 11 13:43:20 UTC 2024

Modified Files:
        src/sys/kern: vfs_syscalls.c

Log Message:
tweak restoration of asyncflag

Simply update mp->mnt_flag with asyncflag as it contains the correct value.
Use the same pattern as in the other two places (vfs_syscalls.c, ffs_wapbl.c).

NFC.


To generate a diff of this commit:
cvs rdiff -u -r1.567 -r1.568 src/sys/kern/vfs_syscalls.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/kern/vfs_syscalls.c
diff -u src/sys/kern/vfs_syscalls.c:1.567 src/sys/kern/vfs_syscalls.c:1.568
--- src/sys/kern/vfs_syscalls.c:1.567	Sun Aug 11 13:09:58 2024
+++ src/sys/kern/vfs_syscalls.c	Sun Aug 11 13:43:20 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_syscalls.c,v 1.567 2024/08/11 13:09:58 bad Exp $	*/
+/*	$NetBSD: vfs_syscalls.c,v 1.568 2024/08/11 13:43:20 bad Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009, 2019, 2020, 2023 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.567 2024/08/11 13:09:58 bad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.568 2024/08/11 13:43:20 bad Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_fileassoc.h"
@@ -749,8 +749,7 @@ do_sys_sync(struct lwp *l)
 			asyncflag = mp->mnt_flag & MNT_ASYNC;
 			mp->mnt_flag &= ~MNT_ASYNC;
 			VFS_SYNC(mp, MNT_NOWAIT, l->l_cred);
-			if (asyncflag)
-				 mp->mnt_flag |= MNT_ASYNC;
+			mp->mnt_flag |= asyncflag;
 		}
 		mutex_exit(mp->mnt_updating);
 	}

Reply via email to