Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/ufs/lfs Keep on holding lfs_lock when calling cv_broadcast
details: https://anonhg.NetBSD.org/src/rev/7e7a9aae7584
branches: trunk
changeset: 352444:7e7a9aae7584
user: maya <maya%NetBSD.org@localhost>
date: Sat Apr 01 14:53:48 2017 +0000
description:
Keep on holding lfs_lock when calling cv_broadcast
pointed out by skrll, thanks.
diffstat:
sys/ufs/lfs/lfs_subr.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (29 lines):
diff -r 97f48cab6d69 -r 7e7a9aae7584 sys/ufs/lfs/lfs_subr.c
--- a/sys/ufs/lfs/lfs_subr.c Sat Apr 01 14:43:00 2017 +0000
+++ b/sys/ufs/lfs/lfs_subr.c Sat Apr 01 14:53:48 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_subr.c,v 1.87 2017/04/01 14:43:00 maya Exp $ */
+/* $NetBSD: lfs_subr.c,v 1.88 2017/04/01 14:53:48 maya Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lfs_subr.c,v 1.87 2017/04/01 14:43:00 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_subr.c,v 1.88 2017/04/01 14:53:48 maya Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -595,9 +595,9 @@
ASSERT_MAYBE_SEGLOCK(fs);
mutex_enter(&lfs_lock);
dowakeup = !(--fs->lfs_writer);
- mutex_exit(&lfs_lock);
if (dowakeup)
cv_broadcast(&fs->lfs_diropscv);
+ mutex_exit(&lfs_lock);
}
/*
Home |
Main Index |
Thread Index |
Old Index