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)
This commit is contained in:
Mike Smith 1999-09-30 05:29:59 +00:00
parent c124f1f780
commit 46a706dc69

View File

@ -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);
}