Module Name:    src
Committed By:   pgoyette
Date:           Sat Jul 23 05:01:09 UTC 2016

Modified Files:
        src/sys/miscfs/specfs [pgoyette-localcount]: spec_vnops.c

Log Message:
Restore original handling of ioctl() returns.  If the underlying disk's
ioctl() returns success, we call uvm_vnp_setsize().  Regardless of any
error from the ioctl() call we should return success.


To generate a diff of this commit:
cvs rdiff -u -r1.162.2.3 -r1.162.2.4 src/sys/miscfs/specfs/spec_vnops.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/miscfs/specfs/spec_vnops.c
diff -u src/sys/miscfs/specfs/spec_vnops.c:1.162.2.3 src/sys/miscfs/specfs/spec_vnops.c:1.162.2.4
--- src/sys/miscfs/specfs/spec_vnops.c:1.162.2.3	Fri Jul 22 01:50:12 2016
+++ src/sys/miscfs/specfs/spec_vnops.c	Sat Jul 23 05:01:09 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: spec_vnops.c,v 1.162.2.3 2016/07/22 01:50:12 pgoyette Exp $	*/
+/*	$NetBSD: spec_vnops.c,v 1.162.2.4 2016/07/23 05:01:09 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: spec_vnops.c,v 1.162.2.3 2016/07/22 01:50:12 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: spec_vnops.c,v 1.162.2.4 2016/07/23 05:01:09 pgoyette Exp $");
 
 #include <sys/param.h>
 #include <sys/proc.h>
@@ -661,6 +661,13 @@ spec_open(void *v)
 	if (error == 0)
 		uvm_vnp_setsize(vp, (voff_t)pi.pi_secsize * pi.pi_size);
 
+	if (cdev != NULL)
+		cdevsw_release(cdev);
+	if (bdev != NULL)
+		bdevsw_release(bdev);
+
+	return 0;
+
  out:
 	if (cdev != NULL)
 		cdevsw_release(cdev);

Reply via email to