Module Name: src Committed By: maya Date: Sat Apr 1 14:53:48 UTC 2017
Modified Files: src/sys/ufs/lfs: lfs_subr.c Log Message: Keep on holding lfs_lock when calling cv_broadcast pointed out by skrll, thanks. To generate a diff of this commit: cvs rdiff -u -r1.87 -r1.88 src/sys/ufs/lfs/lfs_subr.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/ufs/lfs/lfs_subr.c diff -u src/sys/ufs/lfs/lfs_subr.c:1.87 src/sys/ufs/lfs/lfs_subr.c:1.88 --- src/sys/ufs/lfs/lfs_subr.c:1.87 Sat Apr 1 14:43:00 2017 +++ src/sys/ufs/lfs/lfs_subr.c Sat Apr 1 14:53:48 2017 @@ -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 @@ lfs_writer_leave(struct lfs *fs) 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); } /*