summaryrefslogtreecommitdiff
path: root/fs/coda/coda_linux.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/coda/coda_linux.c')
-rw-r--r--fs/coda/coda_linux.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/fs/coda/coda_linux.c b/fs/coda/coda_linux.c
index 8addcd166908..e4b5f02f0dd4 100644
--- a/fs/coda/coda_linux.c
+++ b/fs/coda/coda_linux.c
@@ -66,13 +66,8 @@ unsigned short coda_flags_to_cflags(unsigned short flags)
return coda_flags;
}
-static struct timespec64 coda_to_timespec64(struct vtimespec ts)
+static struct timespec64 coda_to_timespec64(struct coda_timespec ts)
{
- /*
- * We interpret incoming timestamps as 'signed' to match traditional
- * usage and support pre-1970 timestamps, but this breaks in y2038
- * on 32-bit machines.
- */
struct timespec64 ts64 = {
.tv_sec = ts.tv_sec,
.tv_nsec = ts.tv_nsec,
@@ -81,12 +76,10 @@ static struct timespec64 coda_to_timespec64(struct vtimespec ts)
return ts64;
}
-static struct vtimespec timespec64_to_coda(struct timespec64 ts64)
+static struct coda_timespec timespec64_to_coda(struct timespec64 ts64)
{
- /* clamp the timestamps to the maximum range rather than wrapping */
- struct vtimespec ts = {
- .tv_sec = lower_32_bits(clamp_t(time64_t, ts64.tv_sec,
- LONG_MIN, LONG_MAX)),
+ struct coda_timespec ts = {
+ .tv_sec = ts64.tv_sec,
.tv_nsec = ts64.tv_nsec,
};
@@ -156,11 +149,11 @@ void coda_iattr_to_vattr(struct iattr *iattr, struct coda_vattr *vattr)
vattr->va_uid = (vuid_t) -1;
vattr->va_gid = (vgid_t) -1;
vattr->va_size = (off_t) -1;
- vattr->va_atime.tv_sec = (long) -1;
+ vattr->va_atime.tv_sec = (int64_t) -1;
vattr->va_atime.tv_nsec = (long) -1;
- vattr->va_mtime.tv_sec = (long) -1;
+ vattr->va_mtime.tv_sec = (int64_t) -1;
vattr->va_mtime.tv_nsec = (long) -1;
- vattr->va_ctime.tv_sec = (long) -1;
+ vattr->va_ctime.tv_sec = (int64_t) -1;
vattr->va_ctime.tv_nsec = (long) -1;
vattr->va_type = C_VNON;
vattr->va_fileid = -1;