diff options
author | Ralph Boehme <slow@samba.org> | 2020-03-15 08:30:21 +0100 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2020-04-07 08:12:37 +0000 |
commit | 6d3279d01d9e75514fe8b7f070b32ed5b8d9e7c5 (patch) | |
tree | 10e12ab6ad4eb37c739b95b7785a15e3f01a4d8a | |
parent | f09cb423ec6b66313a92c12543412aa0c4bf5596 (diff) | |
download | samba-6d3279d01d9e75514fe8b7f070b32ed5b8d9e7c5.tar.gz |
smbd: let mark_file_modified() always call trigger_write_time_update()
Preperatory change: the next commit will reset fsp->update_write_time_on_close
in the event handler, so this change ensures it gets set again for any
subsequent write.
This will NOT always result in a write-time update because
trigger_write_time_update() has its own only-once logic using the internal
variable fsp->update_write_time_triggered.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14320
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 53de2da7acfc24513082190502d93306c12b7434)
-rw-r--r-- | source3/smbd/fileio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/smbd/fileio.c b/source3/smbd/fileio.c index 2487baeb369..aba7f878b17 100644 --- a/source3/smbd/fileio.c +++ b/source3/smbd/fileio.c @@ -214,14 +214,14 @@ void mark_file_modified(files_struct *fsp) { int dosmode; + trigger_write_time_update(fsp); + if (fsp->modified) { return; } fsp->modified = true; - trigger_write_time_update(fsp); - if (fsp->posix_flags & FSP_POSIX_FLAGS_OPEN) { return; } |