The fs_sync() function (or any other, for that matter) must not hold the
sMountMutex lock when calling sync() on a file system. This fixes a potential deadlock (I just encountered for the first time). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24915 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
75015ff525
commit
ac0e5c1ce5
@ -6721,13 +6721,9 @@ fs_sync(dev_t device)
|
||||
|
||||
// And then, let the file systems do their synchronizing work
|
||||
|
||||
mutex_lock(&sMountMutex);
|
||||
|
||||
if (HAS_FS_MOUNT_CALL(mount, sync))
|
||||
status = FS_MOUNT_CALL_NO_PARAMS(mount, sync);
|
||||
|
||||
mutex_unlock(&sMountMutex);
|
||||
|
||||
put_mount(mount);
|
||||
return status;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user