Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/ufs/ffs handle allocation errors in truncate-up case.
details: https://anonhg.NetBSD.org/src/rev/628a2869863d
branches: trunk
changeset: 515547:628a2869863d
user: chs <chs%NetBSD.org@localhost>
date: Fri Sep 28 11:43:23 2001 +0000
description:
handle allocation errors in truncate-up case.
diffstat:
sys/ufs/ffs/ffs_inode.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (22 lines):
diff -r 76acc3353519 -r 628a2869863d sys/ufs/ffs/ffs_inode.c
--- a/sys/ufs/ffs/ffs_inode.c Fri Sep 28 11:25:37 2001 +0000
+++ b/sys/ufs/ffs/ffs_inode.c Fri Sep 28 11:43:23 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ffs_inode.c,v 1.44 2001/09/20 08:25:59 chs Exp $ */
+/* $NetBSD: ffs_inode.c,v 1.45 2001/09/28 11:43:23 chs Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1993
@@ -215,8 +215,11 @@
*/
if (osize < length) {
- ufs_balloc_range(ovp, length - 1, 1, ap->a_cred,
+ error = ufs_balloc_range(ovp, length - 1, 1, ap->a_cred,
ap->a_flags & IO_SYNC ? B_SYNC : 0);
+ if (error) {
+ return error;
+ }
uvm_vnp_setsize(ovp, length);
oip->i_flag |= IN_CHANGE | IN_UPDATE;
KASSERT(ovp->v_size == oip->i_ffs_size);
Home |
Main Index |
Thread Index |
Old Index