kernel disk/vn: fix locking in vnstrategy
authorJoris Giovannangeli <joris@giovannangeli.fr>
Sun, 8 Jun 2014 10:48:15 +0000 (12:48 +0200)
committerJoris Giovannangeli <joris@giovannangeli.fr>
Sun, 8 Jun 2014 10:49:44 +0000 (12:49 +0200)
sys/dev/disk/vn/vn.c

index 8a7a588..45f1bd3 100644 (file)
@@ -362,9 +362,10 @@ vnstrategy(struct dev_strategy_args *ap)
                default:
                        auio.uio_resid = 0;
                        error = 0;
-                       break;
+                       goto breakunlocked;
                }
                vn_unlock(vn->sc_vp);
+breakunlocked:
                bp->b_resid = auio.uio_resid;
                if (error) {
                        bp->b_error = error;