Module Name: src
Committed By: pgoyette
Date: Wed Jul 27 05:14:40 UTC 2016
Modified Files:
src/sys/dev: md.c
Log Message:
Don't mutex_exit() if we didn't mutex_enter().
Pointed out by coypu. Thanks!
To generate a diff of this commit:
cvs rdiff -u -r1.77 -r1.78 src/sys/dev/md.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/dev/md.c
diff -u src/sys/dev/md.c:1.77 src/sys/dev/md.c:1.78
--- src/sys/dev/md.c:1.77 Wed Jul 27 01:09:44 2016
+++ src/sys/dev/md.c Wed Jul 27 05:14:40 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: md.c,v 1.77 2016/07/27 01:09:44 pgoyette Exp $ */
+/* $NetBSD: md.c,v 1.78 2016/07/27 05:14:40 pgoyette Exp $ */
/*
* Copyright (c) 1995 Gordon W. Ross, Leo Weppelman.
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: md.c,v 1.77 2016/07/27 01:09:44 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: md.c,v 1.78 2016/07/27 05:14:40 pgoyette Exp $");
#ifdef _KERNEL_OPT
#include "opt_md.h"
@@ -463,9 +463,9 @@ mdstrategy(struct buf *bp)
bp->b_error = EIO;
break;
}
+ mutex_exit(&sc->sc_lock);
done:
- mutex_exit(&sc->sc_lock);
biodone(bp);
}