From bd89299d2f7ba27f65b901bbbab27677751d0d84 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Sun, 15 Mar 2020 15:51:18 +0100 Subject: smbd: remove stat call from mark_file_modified() 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 Reviewed-by: Jeremy Allison (cherry picked from commit 2c19d27113036d607850f370bb9afd62856d671e) --- source3/smbd/fileio.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/source3/smbd/fileio.c b/source3/smbd/fileio.c index 029965282f1..2487baeb369 100644 --- a/source3/smbd/fileio.c +++ b/source3/smbd/fileio.c @@ -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) { -- cgit v1.2.1