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.
This commit is contained in:
Axel Dörfler
2017-01-16 00:44:53 +01:00
parent add77fd637
commit a2703be2fc
@@ -1,5 +1,5 @@
/* /*
* Copyright 2001-2014, Axel Dörfler, [email protected]. * Copyright 2001-2017, Axel Dörfler, [email protected].
* This file may be used under the terms of the MIT License. * 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); sizeof(int64), inode);
inode->Node().last_modified_time = HOST_ENDIAN_TO_BFS_INT64(modified); 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(); inode->UpdateOldLastModified();
return status; return status;