Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/ufs/lfs stopgap fix- move lfs_lock to include calls to l...
details: https://anonhg.NetBSD.org/src/rev/6464a73ce600
branches: trunk
changeset: 352436:6464a73ce600
user: maya <maya%NetBSD.org@localhost>
date: Fri Mar 31 23:00:21 2017 +0000
description:
stopgap fix- move lfs_lock to include calls to lfs_dino_{set,get}block
blocks new users that need seglock (need to take lfs_lock) that
setblock before the assert (truncate to 0 but 31 blks/31 effblks)
not proper, but lets me run firefox on lfs
diffstat:
sys/ufs/lfs/lfs_inode.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diffs (40 lines):
diff -r 4087811cc0b5 -r 6464a73ce600 sys/ufs/lfs/lfs_inode.c
--- a/sys/ufs/lfs/lfs_inode.c Fri Mar 31 21:07:02 2017 +0000
+++ b/sys/ufs/lfs/lfs_inode.c Fri Mar 31 23:00:21 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_inode.c,v 1.153 2017/03/21 09:53:00 maya Exp $ */
+/* $NetBSD: lfs_inode.c,v 1.154 2017/03/31 23:00:21 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_inode.c,v 1.153 2017/03/21 09:53:00 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_inode.c,v 1.154 2017/03/31 23:00:21 maya Exp $");
#if defined(_KERNEL_OPT)
#include "opt_quota.h"
@@ -573,11 +573,11 @@
oip->i_size = length;
lfs_dino_setsize(fs, oip->i_din, oip->i_size);
oip->i_lfs_effnblks -= blocksreleased;
+
+ mutex_enter(&lfs_lock);
lfs_dino_setblocks(fs, oip->i_din,
lfs_dino_getblocks(fs, oip->i_din) - real_released);
- mutex_enter(&lfs_lock);
lfs_sb_addbfree(fs, blocksreleased);
- mutex_exit(&lfs_lock);
KASSERTMSG((oip->i_size != 0 ||
lfs_dino_getblocks(fs, oip->i_din) == 0),
@@ -592,7 +592,6 @@
/*
* If we truncated to zero, take us off the paging queue.
*/
- mutex_enter(&lfs_lock);
if (oip->i_size == 0 && oip->i_flags & IN_PAGING) {
oip->i_flags &= ~IN_PAGING;
TAILQ_REMOVE(&fs->lfs_pchainhd, oip, i_lfs_pchain);
Home |
Main Index |
Thread Index |
Old Index