Source-Changes-HG archive

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

[src/trunk]: src/sys/ufs/ufs Assert that we can a valid inode when looking up...



details:   https://anonhg.NetBSD.org/src/rev/7078cb3bf790
branches:  trunk
changeset: 778561:7078cb3bf790
user:      tron <tron%NetBSD.org@localhost>
date:      Wed Apr 04 19:52:48 2012 +0000

description:
Assert that we can a valid inode when looking up a file handle.

diffstat:

 sys/ufs/ufs/ufs_vfsops.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r f99d319837fc -r 7078cb3bf790 sys/ufs/ufs/ufs_vfsops.c
--- a/sys/ufs/ufs/ufs_vfsops.c  Wed Apr 04 18:53:34 2012 +0000
+++ b/sys/ufs/ufs/ufs_vfsops.c  Wed Apr 04 19:52:48 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ufs_vfsops.c,v 1.50 2012/02/01 05:34:43 dholland Exp $ */
+/*     $NetBSD: ufs_vfsops.c,v 1.51 2012/04/04 19:52:48 tron Exp $     */
 
 /*
  * Copyright (c) 1991, 1993, 1994
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ufs_vfsops.c,v 1.50 2012/02/01 05:34:43 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ufs_vfsops.c,v 1.51 2012/04/04 19:52:48 tron Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ffs.h"
@@ -223,6 +223,7 @@
                return (error);
        }
        ip = VTOI(nvp);
+       KASSERT(ip != NULL);
        if (ip->i_mode == 0 || ip->i_gen != ufhp->ufid_gen) {
                vput(nvp);
                *vpp = NULLVP;



Home | Main Index | Thread Index | Old Index