smbd: Remove "file_sync_all" function
[kai/samba-autobuild/.git] / source3 / smbd / files.c
index 6d0f05b9db13e58b35368261ad3d62fc5a3ae129..397baea84cbf01543ee6fb303daec94ee42cd091 100644 (file)
@@ -454,22 +454,6 @@ bool file_find_subpath(files_struct *dir_fsp)
        return false;
 }
 
-/****************************************************************************
- Sync open files on a connection.
-****************************************************************************/
-
-void file_sync_all(connection_struct *conn)
-{
-       files_struct *fsp, *next;
-
-       for (fsp=conn->sconn->files; fsp; fsp=next) {
-               next=fsp->next;
-               if ((conn == fsp->conn) && (fsp->fh->fd != -1)) {
-                       sync_file(conn, fsp, True /* write through */);
-               }
-       }
-}
-
 /****************************************************************************
  Free up a fsp.
 ****************************************************************************/
@@ -552,9 +536,7 @@ void file_free(struct smb_request *req, files_struct *fsp)
         * Clear all possible chained fsp
         * pointers in the SMB2 request queue.
         */
-       if (req != NULL && req->smb2req) {
-               remove_smb2_chained_fsp(fsp);
-       }
+       remove_smb2_chained_fsp(fsp);
 
        /* Drop all remaining extensions. */
        vfs_remove_all_fsp_extensions(fsp);