diff options
author | Arnd Bergmann <arnd@arndb.de> | 2019-10-31 14:55:32 +0100 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2019-12-19 23:46:08 +0100 |
commit | 92c5e46911c0c1b20fa2294298aaf008c3afe975 (patch) | |
tree | 778b8208d025275dc29128be199efc0614c080f7 /fs/nfsd/nfsfh.h | |
parent | nfsd: print 64-bit timestamps in client_info_show (diff) | |
download | linux-92c5e46911c0c1b20fa2294298aaf008c3afe975.tar.xz linux-92c5e46911c0c1b20fa2294298aaf008c3afe975.zip |
nfsd: handle nfs3 timestamps as unsigned
The decode_time3 function behaves differently on 32-bit
and 64-bit architectures: on the former, a 32-bit timestamp
gets converted into an signed number and then into a timestamp
between 1902 and 2038, while on the latter it is interpreted
as unsigned in the range 1970-2106.
Change all the remaining 'timespec' in nfsd to 'timespec64'
to make the behavior the same, and use the current interpretation
of the dominant 64-bit architectures.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfsfh.h')
-rw-r--r-- | fs/nfsd/nfsfh.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/nfsd/nfsfh.h b/fs/nfsd/nfsfh.h index b9c75680bc31..56cfbc361561 100644 --- a/fs/nfsd/nfsfh.h +++ b/fs/nfsd/nfsfh.h @@ -42,8 +42,8 @@ typedef struct svc_fh { /* Pre-op attributes saved during fh_lock */ __u64 fh_pre_size; /* size before operation */ - struct timespec fh_pre_mtime; /* mtime before oper */ - struct timespec fh_pre_ctime; /* ctime before oper */ + struct timespec64 fh_pre_mtime; /* mtime before oper */ + struct timespec64 fh_pre_ctime; /* ctime before oper */ /* * pre-op nfsv4 change attr: note must check IS_I_VERSION(inode) * to find out if it is valid. |