smbd: remove stat call from mark_file_modified()
authorRalph Boehme <slow@samba.org>
Sun, 15 Mar 2020 14:51:18 +0000 (15:51 +0100)
committerKarolin Seeger <kseeger@samba.org>
Tue, 7 Apr 2020 08:12:36 +0000 (08:12 +0000)
This stat dates back to d03453864ab1bc5fd3b4a3abaf96176a006c102b where the call
to trigger_write_time_update() had been to the file IO codepath. It was present
there for other reasons: to setup the write-cache based on the file's size.

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 2c19d27113036d607850f370bb9afd62856d671e)

source3/smbd/fileio.c

index 029965282f1b6317875a01b8f465e245c3f46d3c..2487baeb36952ebe4d75df36ca20d5ed1f60a4ff 100644 (file)
@@ -220,9 +220,6 @@ void mark_file_modified(files_struct *fsp)
 
        fsp->modified = true;
 
-       if (SMB_VFS_FSTAT(fsp, &fsp->fsp_name->st) != 0) {
-               return;
-       }
        trigger_write_time_update(fsp);
 
        if (fsp->posix_flags & FSP_POSIX_FLAGS_OPEN) {