Module Name:    src
Committed By:   riastradh
Date:           Wed Apr 15 14:39:24 UTC 2015

Modified Files:
        src/sys/ufs/ufs: ufs_inode.c

Log Message:
Release the glock on VOP_GETPAGES failure.

Tripped over by nick@'s failing disk, missing unlock in error branch
discovered by jmcneill@.


To generate a diff of this commit:
cvs rdiff -u -r1.92 -r1.93 src/sys/ufs/ufs/ufs_inode.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/ufs/ufs/ufs_inode.c
diff -u src/sys/ufs/ufs/ufs_inode.c:1.92 src/sys/ufs/ufs/ufs_inode.c:1.93
--- src/sys/ufs/ufs/ufs_inode.c:1.92	Wed Oct 29 01:13:28 2014
+++ src/sys/ufs/ufs/ufs_inode.c	Wed Apr 15 14:39:24 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: ufs_inode.c,v 1.92 2014/10/29 01:13:28 christos Exp $	*/
+/*	$NetBSD: ufs_inode.c,v 1.93 2015/04/15 14:39:24 riastradh Exp $	*/
 
 /*
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ufs_inode.c,v 1.92 2014/10/29 01:13:28 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ufs_inode.c,v 1.93 2015/04/15 14:39:24 riastradh Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ffs.h"
@@ -229,6 +229,7 @@ ufs_balloc_range(struct vnode *vp, off_t
 	    VM_PROT_WRITE, 0, PGO_SYNCIO | PGO_PASTEOF | PGO_NOBLOCKALLOC |
 	    PGO_NOTIMESTAMP | PGO_GLOCKHELD);
 	if (error) {
+		genfs_node_unlock(vp);
 		goto out;
 	}
 

Reply via email to