Source-Changes-HG archive

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

[src/trunk]: src/sys/ufs/ufs Release the glock on VOP_GETPAGES failure.



details:   https://anonhg.NetBSD.org/src/rev/ea01a82a6f2f
branches:  trunk
changeset: 337468:ea01a82a6f2f
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Wed Apr 15 14:39:24 2015 +0000

description:
Release the glock on VOP_GETPAGES failure.

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

diffstat:

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

diffs (26 lines):

diff -r 7f0460598cd1 -r ea01a82a6f2f sys/ufs/ufs/ufs_inode.c
--- a/sys/ufs/ufs/ufs_inode.c   Wed Apr 15 13:22:50 2015 +0000
+++ b/sys/ufs/ufs/ufs_inode.c   Wed Apr 15 14:39:24 2015 +0000
@@ -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 @@
            VM_PROT_WRITE, 0, PGO_SYNCIO | PGO_PASTEOF | PGO_NOBLOCKALLOC |
            PGO_NOTIMESTAMP | PGO_GLOCKHELD);
        if (error) {
+               genfs_node_unlock(vp);
                goto out;
        }
 



Home | Main Index | Thread Index | Old Index