Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/fs/union Set IMNT_MPSAFE only if all lower layers have i...
details: https://anonhg.NetBSD.org/src/rev/eb3b95a1ffd2
branches: trunk
changeset: 373372:eb3b95a1ffd2
user: hannken <hannken%NetBSD.org@localhost>
date: Mon Feb 06 10:33:32 2023 +0000
description:
Set IMNT_MPSAFE only if all lower layers have it set.
diffstat:
sys/fs/union/union_vfsops.c | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diffs (34 lines):
diff -r 8a5129ee5489 -r eb3b95a1ffd2 sys/fs/union/union_vfsops.c
--- a/sys/fs/union/union_vfsops.c Mon Feb 06 10:32:58 2023 +0000
+++ b/sys/fs/union/union_vfsops.c Mon Feb 06 10:33:32 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: union_vfsops.c,v 1.85 2022/11/21 10:37:14 hannken Exp $ */
+/* $NetBSD: union_vfsops.c,v 1.86 2023/02/06 10:33:32 hannken Exp $ */
/*
* Copyright (c) 1994 The Regents of the University of California.
@@ -77,7 +77,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: union_vfsops.c,v 1.85 2022/11/21 10:37:14 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: union_vfsops.c,v 1.86 2023/02/06 10:33:32 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -198,7 +198,14 @@
goto bad;
}
- mp->mnt_iflag |= IMNT_MPSAFE;
+ /*
+ * This mount is mp-safe if both lower mounts are mp-safe.
+ */
+
+ if (((um->um_lowervp == NULLVP) ||
+ (um->um_lowervp->v_mount->mnt_iflag & IMNT_MPSAFE)) &&
+ (um->um_uppervp->v_mount->mnt_iflag & IMNT_MPSAFE))
+ mp->mnt_iflag |= IMNT_MPSAFE;
/*
* Unless the mount is readonly, ensure that the top layer
Home |
Main Index |
Thread Index |
Old Index