From ac0e5c1ce5073978eb18ad75c112b6b9b4749ce7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Fri, 11 Apr 2008 17:01:25 +0000 Subject: [PATCH] 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 --- src/system/kernel/fs/vfs.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/system/kernel/fs/vfs.cpp b/src/system/kernel/fs/vfs.cpp index f6b0cd86ce..0822b887a9 100644 --- a/src/system/kernel/fs/vfs.cpp +++ b/src/system/kernel/fs/vfs.cpp @@ -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; }