summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/fileio.c10
-rw-r--r--source3/smbd/trans2.c5
2 files changed, 15 insertions, 0 deletions
diff --git a/source3/smbd/fileio.c b/source3/smbd/fileio.c
index 843b3f9586..5cc3d4b88b 100644
--- a/source3/smbd/fileio.c
+++ b/source3/smbd/fileio.c
@@ -193,6 +193,11 @@ void trigger_write_time_update(struct files_struct *fsp)
{
int delay;
+ if (fsp->posix_open) {
+ /* Don't use delayed writes on POSIX files. */
+ return;
+ }
+
if (fsp->write_time_forced) {
/* No point - "sticky" write times
* in effect.
@@ -224,6 +229,11 @@ void trigger_write_time_update(struct files_struct *fsp)
void trigger_write_time_update_immediate(struct files_struct *fsp)
{
+ if (fsp->posix_open) {
+ /* Don't use delayed writes on POSIX files. */
+ return;
+ }
+
if (fsp->write_time_forced) {
/*
* No point - "sticky" write times
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 41081ca0dd..28b07527cc 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -6249,6 +6249,11 @@ size = %.0f, uid = %u, gid = %u, raw perms = 0%o\n",
}
/* Deal with any time changes. */
+ if (null_timespec(ft.mtime) && null_timespec(ft.atime)) {
+ /* No change, don't cancel anything. */
+ return status;
+ }
+
id = vfs_file_id_from_sbuf(conn, psbuf);
for(all_fsps = file_find_di_first(id); all_fsps;
all_fsps = file_find_di_next(all_fsps)) {