r21714: Change the VFS interface to use struct timespec
[nivanova/samba-autobuild/.git] / source3 / smbd / files.c
index fc1700de118898e4dfe3194fe15131406da465b0..062bebd58e66886627a472c0e293b83b158fa066 100644 (file)
@@ -361,50 +361,6 @@ files_struct *file_find_di_next(files_struct *start_fsp)
        return NULL;
 }
 
-/*
- * Same as file_find_di_first/next, but also finds non-fd opens.
- *
- * Jeremy, do we really need the fsp->fh->fd != -1 ??
- */
-
-struct files_struct *fsp_find_di_first(SMB_DEV_T dev, SMB_INO_T inode)
-{
-       files_struct *fsp;
-
-       if (fsp_fi_cache.dev == dev && fsp_fi_cache.inode == inode) {
-               /* Positive or negative cache hit. */
-               return fsp_fi_cache.fsp;
-       }
-
-       fsp_fi_cache.dev = dev;
-       fsp_fi_cache.inode = inode;
-
-       for (fsp=Files;fsp;fsp=fsp->next) {
-               if ((fsp->dev == dev) && (fsp->inode == inode)) {
-                       /* Setup positive cache. */
-                       fsp_fi_cache.fsp = fsp;
-                       return fsp;
-               }
-       }
-
-       /* Setup negative cache. */
-       fsp_fi_cache.fsp = NULL;
-       return NULL;
-}
-
-struct files_struct *fsp_find_di_next(files_struct *start_fsp)
-{
-       files_struct *fsp;
-
-       for (fsp = start_fsp->next;fsp;fsp=fsp->next) {
-               if ( (fsp->dev == start_fsp->dev)
-                    && (fsp->inode == start_fsp->inode) )
-                       return fsp;
-       }
-
-       return NULL;
-}
-
 /****************************************************************************
  Find a fsp that is open for printing.
 ****************************************************************************/
@@ -427,11 +383,11 @@ files_struct *file_find_print(void)
  Record the owner of that modtime.
 ****************************************************************************/
 
-void fsp_set_pending_modtime(files_struct *tfsp, time_t pmod)
+void fsp_set_pending_modtime(files_struct *tfsp, const struct timespec mod)
 {
        files_struct *fsp;
 
-       if (null_mtime(pmod)) {
+       if (null_timespec(mod)) {
                return;
        }
 
@@ -439,7 +395,7 @@ void fsp_set_pending_modtime(files_struct *tfsp, time_t pmod)
                if ( fsp->fh->fd != -1 &&
                                fsp->dev == tfsp->dev &&
                                fsp->inode == tfsp->inode ) {
-                       fsp->pending_modtime = pmod;
+                       fsp->pending_modtime = mod;
                        fsp->pending_modtime_owner = False;
                }
        }
@@ -610,7 +566,6 @@ NTSTATUS dup_file_fsp(files_struct *fsp,
        dup_fsp->modified = fsp->modified;
        dup_fsp->is_directory = fsp->is_directory;
        dup_fsp->is_stat = fsp->is_stat;
-       dup_fsp->aio_write_behind = fsp->aio_write_behind;
         string_set(&dup_fsp->fsp_name,fsp->fsp_name);
 
        *result = dup_fsp;