From a2703be2fca8dc77bcec6711a7c4abae637b1c27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Thu, 12 Jan 2017 21:21:37 +0100 Subject: [PATCH] bfs: Update old modified time if index is missing. * This is required to avoid spurious last modified time change notifications on file systems without index. * This closes ticket #9834. --- src/add-ons/kernel/file_systems/bfs/Index.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/add-ons/kernel/file_systems/bfs/Index.cpp b/src/add-ons/kernel/file_systems/bfs/Index.cpp index 74bd3a3e9e..cf692aede9 100644 --- a/src/add-ons/kernel/file_systems/bfs/Index.cpp +++ b/src/add-ons/kernel/file_systems/bfs/Index.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2014, Axel Dörfler, axeld@pinc-software.de. + * Copyright 2001-2017, Axel Dörfler, axeld@pinc-software.de. * This file may be used under the terms of the MIT License. */ @@ -386,7 +386,10 @@ Index::UpdateLastModified(Transaction& transaction, Inode* inode, sizeof(int64), inode); inode->Node().last_modified_time = HOST_ENDIAN_TO_BFS_INT64(modified); - if (status == B_OK) + // No matter if the index exists or not, we will update the old last + // modified field, since this is also being used to determine whether + // or not to send out notifications. + if (status == B_OK || status == B_BAD_INDEX) inode->UpdateOldLastModified(); return status;