Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-2-0]: src/sys/ufs/lfs Pullup rev 1.83 (requested by oster in tick...
details: https://anonhg.NetBSD.org/src/rev/6667891946b6
branches: netbsd-2-0
changeset: 560360:6667891946b6
user: jmc <jmc%NetBSD.org@localhost>
date: Fri Apr 09 23:09:10 2004 +0000
description:
Pullup rev 1.83 (requested by oster in ticket #112)
If we bail out due to an error, we need 'unreserve' the space that
we'd reserved earlier.
diffstat:
sys/ufs/lfs/lfs_inode.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (36 lines):
diff -r 359453f5f54a -r 6667891946b6 sys/ufs/lfs/lfs_inode.c
--- a/sys/ufs/lfs/lfs_inode.c Fri Apr 09 23:07:44 2004 +0000
+++ b/sys/ufs/lfs/lfs_inode.c Fri Apr 09 23:09:10 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_inode.c,v 1.82 2004/01/25 18:06:49 hannken Exp $ */
+/* $NetBSD: lfs_inode.c,v 1.82.2.1 2004/04/09 23:09:10 jmc Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lfs_inode.c,v 1.82 2004/01/25 18:06:49 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_inode.c,v 1.82.2.1 2004/04/09 23:09:10 jmc Exp $");
#if defined(_KERNEL_OPT)
#include "opt_quota.h"
@@ -401,6 +401,8 @@
error = ufs_balloc_range(ovp, length - 1, 1, ap->a_cred,
aflags);
if (error) {
+ lfs_reserve(fs, ovp, NULL,
+ -btofsb(fs, (2 * NIADDR + 3) << fs->lfs_bshift));
goto errout;
}
eoz = blkroundup(fs, length);
@@ -409,6 +411,8 @@
error = VOP_PUTPAGES(ovp, trunc_page(length), round_page(eoz),
PGO_CLEANIT | PGO_DEACTIVATE | (aflags ? PGO_SYNCIO : 0));
if (error) {
+ lfs_reserve(fs, ovp, NULL,
+ -btofsb(fs, (2 * NIADDR + 3) << fs->lfs_bshift));
goto errout;
}
}
Home |
Main Index |
Thread Index |
Old Index