Commit e29f4703 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by J. Bruce Fields

nfsd: print 64-bit timestamps in client_info_show

The nii_time field gets truncated to 'time_t' on 32-bit architectures
before printing.

Remove the use of 'struct timespec' to product the correct output
beyond 2038.
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent b3f255ef
...@@ -2341,7 +2341,7 @@ static int client_info_show(struct seq_file *m, void *v) ...@@ -2341,7 +2341,7 @@ static int client_info_show(struct seq_file *m, void *v)
clp->cl_nii_domain.len); clp->cl_nii_domain.len);
seq_printf(m, "\nImplementation name: "); seq_printf(m, "\nImplementation name: ");
seq_quote_mem(m, clp->cl_nii_name.data, clp->cl_nii_name.len); seq_quote_mem(m, clp->cl_nii_name.data, clp->cl_nii_name.len);
seq_printf(m, "\nImplementation time: [%ld, %ld]\n", seq_printf(m, "\nImplementation time: [%lld, %ld]\n",
clp->cl_nii_time.tv_sec, clp->cl_nii_time.tv_nsec); clp->cl_nii_time.tv_sec, clp->cl_nii_time.tv_nsec);
} }
drop_client(clp); drop_client(clp);
...@@ -2995,8 +2995,7 @@ static __be32 copy_impl_id(struct nfs4_client *clp, ...@@ -2995,8 +2995,7 @@ static __be32 copy_impl_id(struct nfs4_client *clp,
xdr_netobj_dup(&clp->cl_nii_name, &exid->nii_name, GFP_KERNEL); xdr_netobj_dup(&clp->cl_nii_name, &exid->nii_name, GFP_KERNEL);
if (!clp->cl_nii_name.data) if (!clp->cl_nii_name.data)
return nfserr_jukebox; return nfserr_jukebox;
clp->cl_nii_time.tv_sec = exid->nii_time.tv_sec; clp->cl_nii_time = exid->nii_time;
clp->cl_nii_time.tv_nsec = exid->nii_time.tv_nsec;
return 0; return 0;
} }
......
...@@ -340,7 +340,7 @@ struct nfs4_client { ...@@ -340,7 +340,7 @@ struct nfs4_client {
/* NFSv4.1 client implementation id: */ /* NFSv4.1 client implementation id: */
struct xdr_netobj cl_nii_domain; struct xdr_netobj cl_nii_domain;
struct xdr_netobj cl_nii_name; struct xdr_netobj cl_nii_name;
struct timespec cl_nii_time; struct timespec64 cl_nii_time;
/* for v4.0 and v4.1 callbacks: */ /* for v4.0 and v4.1 callbacks: */
struct nfs4_cb_conn cl_cb_conn; struct nfs4_cb_conn cl_cb_conn;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment