summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_disk.c
diff options
context:
space:
mode:
authormsmith <msmith@FreeBSD.org>1999-09-30 05:29:59 +0000
committermsmith <msmith@FreeBSD.org>1999-09-30 05:29:59 +0000
commit4569b2fde6537a667bcff4d094e3cbab325134a8 (patch)
tree1cba419ceb401e725baf66b3b884807aaf5ed201 /sys/kern/subr_disk.c
parent581ae56e3bc2355e2f67d29894c679be270d5295 (diff)
downloadFreeBSD-src-4569b2fde6537a667bcff4d094e3cbab325134a8.zip
FreeBSD-src-4569b2fde6537a667bcff4d094e3cbab325134a8.tar.gz
Test the slices for openness before we close them; doing it the other way
around meant that the higher level close routine never gets called. (phk is on the road; this is a quick fix to get things working and may need more polish)
Diffstat (limited to 'sys/kern/subr_disk.c')
-rw-r--r--sys/kern/subr_disk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/subr_disk.c b/sys/kern/subr_disk.c
index ed39236..c482aab 100644
--- a/sys/kern/subr_disk.c
+++ b/sys/kern/subr_disk.c
@@ -141,9 +141,9 @@ diskclose(dev_t dev, int fflag, int devtype, struct proc *p)
error = 0;
dp = dev->si_disk;
- dsclose(dev, devtype, dp->d_slice);
if (dsisopen(dp->d_slice))
error = dp->d_devsw->d_close(dev, fflag, devtype, p);
+ dsclose(dev, devtype, dp->d_slice);
return (error);
}
OpenPOWER on IntegriCloud