Fix disk_close once more, and better this time.

Spotted by:	bde
This commit is contained in:
Poul-Henning Kamp 1999-09-30 19:03:25 +00:00
parent 4fc1dda91d
commit 263ab97134

View File

@ -141,9 +141,9 @@ diskclose(dev_t dev, int fflag, int devtype, struct proc *p)
error = 0;
dp = dev->si_disk;
if (dsisopen(dp->d_slice))
error = dp->d_devsw->d_close(dev, fflag, devtype, p);
dsclose(dev, devtype, dp->d_slice);
if (!dsisopen(dp->d_slice))
error = dp->d_devsw->d_close(dev, fflag, devtype, p);
return (error);
}