]> git.proxmox.com Git - mirror_spl.git/commit
Use current_kernel_time() in the time compatibility wrappers
authorTim Chase <tim@chase2k.com>
Sun, 11 Jan 2015 16:37:43 +0000 (10:37 -0600)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 16 Jan 2015 21:54:35 +0000 (13:54 -0800)
commit47af4b76ffe72457166e4abfcfe23848ac51811a
treec8ca9b0d8bf26ec6bb032e143a980dc354de3049
parent03a783534ad9ea1db71d978f9f850f9dd13ccd51
Use current_kernel_time() in the time compatibility wrappers

Since the Linux kernel's utimens family of functions uses
current_kernel_time(), we need to do the same in the context of ZFS
or else there can be discrepencies in timestamps (they go backward)
if userland code does:

fd = creat(FNAME, 0600);
(void) futimens(fd, NULL);

The getnstimeofday() function generally returns a slightly lower time
value.

Signed-off-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes zfsonlinux/zfs#3006
include/sys/time.h