Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Clear per-lwp entries whose mount is gone before th...
details: https://anonhg.NetBSD.org/src/rev/fbe11d9ab76e
branches: trunk
changeset: 449156:fbe11d9ab76e
user: hannken <hannken%NetBSD.org@localhost>
date: Sun Feb 24 16:11:24 2019 +0000
description:
Clear per-lwp entries whose mount is gone before the first return
from fstrans_done().
No longer leaks "struct mount" forever.
diffstat:
sys/kern/vfs_trans.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (38 lines):
diff -r d4d199faddee -r fbe11d9ab76e sys/kern/vfs_trans.c
--- a/sys/kern/vfs_trans.c Sun Feb 24 12:34:00 2019 +0000
+++ b/sys/kern/vfs_trans.c Sun Feb 24 16:11:24 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_trans.c,v 1.55 2019/02/21 08:52:53 hannken Exp $ */
+/* $NetBSD: vfs_trans.c,v 1.56 2019/02/24 16:11:24 hannken Exp $ */
/*-
* Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_trans.c,v 1.55 2019/02/21 08:52:53 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_trans.c,v 1.56 2019/02/24 16:11:24 hannken Exp $");
/*
* File system transaction operations.
@@ -543,6 +543,9 @@
return;
}
+ if (__predict_false(fstrans_gone_count > 0))
+ fstrans_clear_lwp_info();
+
s = pserialize_read_enter();
if (__predict_true(fmi->fmi_state == FSTRANS_NORMAL)) {
fli->fli_trans_cnt = 0;
@@ -552,9 +555,6 @@
}
pserialize_read_exit(s);
- if (__predict_false(fstrans_gone_count > 0))
- fstrans_clear_lwp_info();
-
mutex_enter(&fstrans_lock);
fli->fli_trans_cnt = 0;
cv_signal(&fstrans_count_cv);
Home |
Main Index |
Thread Index |
Old Index