Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/ufs/ffs fix broken test for partial truncate, introduced...



details:   https://anonhg.NetBSD.org/src/rev/ba3eb014ff13
branches:  trunk
changeset: 818932:ba3eb014ff13
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Mon Nov 07 21:14:23 2016 +0000

description:
fix broken test for partial truncate, introduced in rev 1.118

PR kern/51601 kern/51602

diffstat:

 sys/ufs/ffs/ffs_inode.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 3c0a965319ef -r ba3eb014ff13 sys/ufs/ffs/ffs_inode.c
--- a/sys/ufs/ffs/ffs_inode.c   Mon Nov 07 21:09:03 2016 +0000
+++ b/sys/ufs/ffs/ffs_inode.c   Mon Nov 07 21:14:23 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ffs_inode.c,v 1.119 2016/11/07 21:05:38 jdolecek Exp $ */
+/*     $NetBSD: ffs_inode.c,v 1.120 2016/11/07 21:14:23 jdolecek Exp $ */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ffs_inode.c,v 1.119 2016/11/07 21:05:38 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffs_inode.c,v 1.120 2016/11/07 21:14:23 jdolecek Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ffs.h"
@@ -686,7 +686,7 @@
        }
 
 out:
-       if (RBAP(ip, 0) == 0) {
+       if (lastbn < 0 && error == 0) {
                /* all freed, release without writing back */
                brelse(bp, BC_INVAL);
        } else {



Home | Main Index | Thread Index | Old Index