vfs_glusterfs: initialize st_ex_file_id, st_ex_itime and st_ex_iflags
authorRalph Boehme <slow@samba.org>
Wed, 14 Aug 2019 08:11:15 +0000 (10:11 +0200)
committerJeremy Allison <jra@samba.org>
Fri, 16 Aug 2019 01:07:23 +0000 (01:07 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14090
RN: vfs_glusterfs: initialize st_ex_file_id, st_ex_itime and st_ex_iflags

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Aug 16 01:07:23 UTC 2019 on sn-devel-184

source3/modules/vfs_glusterfs.c

index 3aa66c270e18ed48cd937a1a69e0b0c245bc4892..1374da97a79656dec4104eb4ab31ffe621b6a8d9 100644 (file)
@@ -74,12 +74,16 @@ static void smb_stat_ex_from_stat(struct stat_ex *dst, const struct stat *src)
        dst->st_ex_btime.tv_sec = src->st_mtime;
        dst->st_ex_blksize = src->st_blksize;
        dst->st_ex_blocks = src->st_blocks;
+       dst->st_ex_file_id = dst->st_ex_ino;
+       dst->st_ex_iflags |= ST_EX_IFLAG_CALCULATED_FILE_ID;
 #ifdef STAT_HAVE_NSEC
        dst->st_ex_atime.tv_nsec = src->st_atime_nsec;
        dst->st_ex_mtime.tv_nsec = src->st_mtime_nsec;
        dst->st_ex_ctime.tv_nsec = src->st_ctime_nsec;
        dst->st_ex_btime.tv_nsec = src->st_mtime_nsec;
 #endif
+       dst->st_ex_itime = dst->st_ex_btime;
+       dst->st_ex_iflags |= ST_EX_IFLAG_CALCULATED_ITIME;
 }
 
 /* pre-opened glfs_t */