Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/miscfs/genfs support flag PGO_JOURNALLOCKED also for gen...
details: https://anonhg.NetBSD.org/src/rev/3f5eb522784d
branches: trunk
changeset: 995152:3f5eb522784d
user: jdolecek <jdolecek%NetBSD.org@localhost>
date: Sun Dec 09 20:32:37 2018 +0000
description:
support flag PGO_JOURNALLOCKED also for genfs_getpages()
diffstat:
sys/miscfs/genfs/genfs_io.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (36 lines):
diff -r 1134c01d5ee1 -r 3f5eb522784d sys/miscfs/genfs/genfs_io.c
--- a/sys/miscfs/genfs/genfs_io.c Sun Dec 09 20:29:53 2018 +0000
+++ b/sys/miscfs/genfs/genfs_io.c Sun Dec 09 20:32:37 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: genfs_io.c,v 1.72 2018/05/28 21:04:38 chs Exp $ */
+/* $NetBSD: genfs_io.c,v 1.73 2018/12/09 20:32:37 jdolecek Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1993
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: genfs_io.c,v 1.72 2018/05/28 21:04:38 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: genfs_io.c,v 1.73 2018/12/09 20:32:37 jdolecek Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -128,6 +128,8 @@
const bool memwrite = (ap->a_access_type & VM_PROT_WRITE) != 0;
const bool overwrite = (flags & PGO_OVERWRITE) != 0;
const bool blockalloc = memwrite && (flags & PGO_NOBLOCKALLOC) == 0;
+ const bool need_wapbl = (vp->v_mount->mnt_wapbl &&
+ (flags & PGO_JOURNALLOCKED) == 0);
const bool glocked = (flags & PGO_GLOCKHELD) != 0;
bool holds_wapbl = false;
struct mount *trans_mount = NULL;
@@ -313,7 +315,7 @@
* XXX: This assumes that we come here only via
* the mmio path
*/
- if (blockalloc && vp->v_mount->mnt_wapbl) {
+ if (blockalloc && need_wapbl) {
error = WAPBL_BEGIN(trans_mount);
if (error)
goto out_err_free;
Home |
Main Index |
Thread Index |
Old Index