fs: fix some sync locking issues

This commit is contained in:
Matheus
2024-09-18 19:04:59 -03:00
parent 7460e8b707
commit 947623b5f6
2 changed files with 6 additions and 0 deletions
+2
View File
@@ -1771,7 +1771,9 @@ static int ext2_sync(vnode_t *vnode) {
int e = vmmcache_syncvnode(vnode, 0, UINT64_MAX);
ext2fs_t *fs = (ext2fs_t *)vnode->vfs;
// TODO don't sync the entire disk but rather only the inodes and blocks
VOP_LOCK(fs->backing);
int e2 = vmmcache_syncvnode(fs->backing, 0, UINT64_MAX);
VOP_UNLOCK(fs->backing);
// only the first errors are reported
return e ? e : e2;
}