vfs: fix early termination of kern_getfsstat
The kernel would unlock already unlocked mutex if the buffer got filled up before the mount list ended. Reported by: pho Fixes: r363069 ("vfs: depessimize getfsstat when only the count is requested")
This commit is contained in:
parent
422f38d8ea
commit
74f61caed5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=363072
@ -551,7 +551,7 @@ kern_getfsstat(struct thread *td, struct statfs **buf, size_t bufsize,
|
|||||||
|
|
||||||
if (count == maxcount) {
|
if (count == maxcount) {
|
||||||
vfs_unbusy(mp);
|
vfs_unbusy(mp);
|
||||||
break;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
mtx_lock(&mountlist_mtx);
|
mtx_lock(&mountlist_mtx);
|
||||||
|
Loading…
Reference in New Issue
Block a user