From 645a7cd06dfcba2fcd0b2f077815bbdcbb82a3fa Mon Sep 17 00:00:00 2001 From: Jorgen Lundman Date: Wed, 9 Aug 2023 14:33:31 +0900 Subject: [PATCH] Upstream: Correct set/get basic for the 4 time members Put the Windows only section into conditionals for shared code base. Signed-off-by: Jorgen Lundman --- module/zfs/zfs_vnops.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/module/zfs/zfs_vnops.c b/module/zfs/zfs_vnops.c index 04272441ca17..25ecf4e318ed 100644 --- a/module/zfs/zfs_vnops.c +++ b/module/zfs/zfs_vnops.c @@ -426,6 +426,7 @@ zfs_write(znode_t *zp, zfs_uio_t *uio, int ioflag, cred_t *cr) int count = 0; uint64_t mtime[2], ctime[2]; +#ifdef _WIN32 /* Windows addition, skip update of Write and Change if requested */ if (!(uio->uio_extflg & SKIP_WRITE_TIME)) { SA_ADD_BULK_ATTR(bulk, count, SA_ZPL_MTIME(zfsvfs), NULL, @@ -435,6 +436,12 @@ zfs_write(znode_t *zp, zfs_uio_t *uio, int ioflag, cred_t *cr) SA_ADD_BULK_ATTR(bulk, count, SA_ZPL_CTIME(zfsvfs), NULL, &ctime, 16); } +#else + SA_ADD_BULK_ATTR(bulk, count, SA_ZPL_MTIME(zfsvfs), NULL, + &mtime, 16); + SA_ADD_BULK_ATTR(bulk, count, SA_ZPL_CTIME(zfsvfs), NULL, + &ctime, 16); +#endif SA_ADD_BULK_ATTR(bulk, count, SA_ZPL_SIZE(zfsvfs), NULL, &zp->z_size, 8); SA_ADD_BULK_ATTR(bulk, count, SA_ZPL_FLAGS(zfsvfs), NULL,