mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-11 17:04:19 +01:00
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:
parent
c124f1f780
commit
46a706dc69
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=51807
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user