s3:smbd: use stored file_id in SMB_VFS_FS_FILE_ID()
authorRalph Boehme <slow@samba.org>
Thu, 27 Jun 2019 12:46:37 +0000 (14:46 +0200)
committerJeremy Allison <jra@samba.org>
Mon, 1 Jul 2019 21:43:24 +0000 (21:43 +0000)
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/modules/vfs_default.c

index dcb53c64eef45909bb8662b161a27df11f6a4ade..bcad1c8a73694811aaf6824417970c75d1ee7e3a 100644 (file)
@@ -2737,6 +2737,10 @@ static uint64_t vfswrap_fs_file_id(struct vfs_handle_struct *handle,
                return 0;
        }
 
+       if (!(psbuf->st_ex_iflags & ST_EX_IFLAG_CALCULATED_ITIME)) {
+               return psbuf->st_ex_file_id;
+       }
+
        if (handle->conn->base_share_dev == psbuf->st_ex_dev) {
                return (uint64_t)psbuf->st_ex_ino;
        }