From a00ac4bc29ebc7d18dcacd38d3cdc47e5cb3ade0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Mon, 16 Sep 2002 16:06:22 +0000 Subject: [PATCH] bfs_write() called Volume::WriteCachedBlocksIfNecessary() also on uncached files which might cause troubles with the VM file. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1061 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/kernel/file_systems/bfs/kernel_interface.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/add-ons/kernel/file_systems/bfs/kernel_interface.cpp b/src/add-ons/kernel/file_systems/bfs/kernel_interface.cpp index b404e1dbcb..97eb784933 100644 --- a/src/add-ons/kernel/file_systems/bfs/kernel_interface.cpp +++ b/src/add-ons/kernel/file_systems/bfs/kernel_interface.cpp @@ -1178,7 +1178,7 @@ bfs_write(void *_ns, void *_node, void *_cookie, off_t pos, const void *buffer, // ToDo: should we better test for a change in the last_modified time only? if (cookie->last_size != inode->Size() && system_time() > cookie->last_notification + INODE_NOTIFICATION_INTERVAL) { - notify_listener(B_STAT_CHANGED,volume->ID(),0,0,inode->ID(),NULL); + notify_listener(B_STAT_CHANGED, volume->ID(), 0, 0, inode->ID(), NULL); cookie->last_size = inode->Size(); cookie->last_notification = system_time(); } @@ -1187,7 +1187,8 @@ bfs_write(void *_ns, void *_node, void *_cookie, off_t pos, const void *buffer, // It's done here and not in Inode::WriteAt() so that it won't // add to the duration of a transaction - it might even be a // good idea to offload those calls to another thread - volume->WriteCachedBlocksIfNecessary(); + if ((inode->Flags() & INODE_NO_CACHE) == 0) + volume->WriteCachedBlocksIfNecessary(); return status; }