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:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user