From: Ralph Boehme Date: Sun, 15 Mar 2020 14:51:18 +0000 (+0100) Subject: smbd: remove stat call from mark_file_modified() X-Git-Tag: ldb-2.2.0~1395 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2c19d27113036d607850f370bb9afd62856d671e;p=thirdparty%2Fsamba.git 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 --- 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) {