Skip to content

Commit

Permalink
Upstream: Correct set/get basic for the 4 time members
Browse files Browse the repository at this point in the history
Put the Windows only section into conditionals for
shared code base.

Signed-off-by: Jorgen Lundman <[email protected]>
  • Loading branch information
lundman committed Aug 9, 2023
1 parent e9881b3 commit 645a7cd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions module/zfs/zfs_vnops.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit 645a7cd

Please sign in to comment.