summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/fs/smbsrv/smb_ofile.c
diff options
context:
space:
mode:
authorGordon Ross <gordon.ross@tintri.com>2020-11-23 21:37:26 -0500
committerGordon Ross <gordon.ross@tintri.com>2021-02-08 15:23:13 -0500
commita8e9db1c816399e66d096a343815a6e845a7a0cd (patch)
tree20412e2b0f0addf7b10543ee52cb67e75a8391dd /usr/src/uts/common/fs/smbsrv/smb_ofile.c
parentf74a127feb6111d3b6890ae374a142eda1fd4e3e (diff)
downloadillumos-gate-a8e9db1c816399e66d096a343815a6e845a7a0cd.tar.gz
13299 File mtime changes twice, when file is modified using SMB server
Reviewed by: Florian Manschwetus <manschwetus@cs-software-gmbh.de> Reviewed by: Andy Fiddaman <andy@omniosce.org> Reviewed by: Dominik Hassler <hadfl@omniosce.org> Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src/uts/common/fs/smbsrv/smb_ofile.c')
-rw-r--r--usr/src/uts/common/fs/smbsrv/smb_ofile.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/usr/src/uts/common/fs/smbsrv/smb_ofile.c b/usr/src/uts/common/fs/smbsrv/smb_ofile.c
index d5388037c3..6f132cebd3 100644
--- a/usr/src/uts/common/fs/smbsrv/smb_ofile.c
+++ b/usr/src/uts/common/fs/smbsrv/smb_ofile.c
@@ -22,7 +22,7 @@
* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright 2016 Syneto S.R.L. All rights reserved.
* Copyright (c) 2016 by Delphix. All rights reserved.
- * Copyright 2019 Nexenta Systems, Inc. All rights reserved.
+ * Copyright 2020 Tintri by DDN, Inc. All rights reserved.
*/
/*
@@ -446,7 +446,6 @@ void
smb_ofile_close(smb_ofile_t *of, int32_t mtime_sec)
{
smb_attr_t *pa;
- timestruc_t now;
SMB_OFILE_VALID(of);
@@ -498,20 +497,6 @@ smb_ofile_close(smb_ofile_t *of, int32_t mtime_sec)
pa->sa_mask |= SMB_AT_MTIME;
}
- /*
- * If we have ever modified data via this handle
- * (write or truncate) and if the mtime was not
- * set via this handle, update the mtime again
- * during the close. Windows expects this.
- * [ MS-FSA 2.1.5.4 "Update Timestamps" ]
- */
- if (of->f_written &&
- (pa->sa_mask & SMB_AT_MTIME) == 0) {
- pa->sa_mask |= SMB_AT_MTIME;
- gethrestime(&now);
- pa->sa_vattr.va_mtime = now;
- }
-
if (of->f_flags & SMB_OFLAGS_SET_DELETE_ON_CLOSE) {
/* We delete using the on-disk name. */
uint32_t flags = SMB_CASE_SENSITIVE;