Ensure we don't use delayed writes on POSIX opened files.
[ira/wip.git] / source3 / smbd / fileio.c
index 843b3f9586a8df735bf3353955ab8fcd5f1a3437..5cc3d4b88b0ae187d7dddd82c1528e088e869229 100644 (file)
@@ -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