summaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r--fs/nfs/nfs4proc.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 81ccdbbb43e8..9e9334a172cf 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -64,6 +64,7 @@
64#include "iostat.h" 64#include "iostat.h"
65#include "callback.h" 65#include "callback.h"
66#include "pnfs.h" 66#include "pnfs.h"
67#include "netns.h"
67 68
68#define NFSDBG_FACILITY NFSDBG_PROC 69#define NFSDBG_FACILITY NFSDBG_PROC
69 70
@@ -3903,8 +3904,8 @@ wait_on_recovery:
3903 return -EAGAIN; 3904 return -EAGAIN;
3904} 3905}
3905 3906
3906static void nfs4_construct_boot_verifier(struct nfs_client *clp, 3907static void nfs4_init_boot_verifier(const struct nfs_client *clp,
3907 nfs4_verifier *bootverf) 3908 nfs4_verifier *bootverf)
3908{ 3909{
3909 __be32 verf[2]; 3910 __be32 verf[2];
3910 3911
@@ -3914,8 +3915,9 @@ static void nfs4_construct_boot_verifier(struct nfs_client *clp,
3914 verf[0] = 0; 3915 verf[0] = 0;
3915 verf[1] = (__be32)(NSEC_PER_SEC + 1); 3916 verf[1] = (__be32)(NSEC_PER_SEC + 1);
3916 } else { 3917 } else {
3917 verf[0] = (__be32)clp->cl_boot_time.tv_sec; 3918 struct nfs_net *nn = net_generic(clp->cl_net, nfs_net_id);
3918 verf[1] = (__be32)clp->cl_boot_time.tv_nsec; 3919 verf[0] = (__be32)nn->boot_time.tv_sec;
3920 verf[1] = (__be32)nn->boot_time.tv_nsec;
3919 } 3921 }
3920 memcpy(bootverf->data, verf, sizeof(bootverf->data)); 3922 memcpy(bootverf->data, verf, sizeof(bootverf->data));
3921} 3923}
@@ -3939,7 +3941,7 @@ int nfs4_proc_setclientid(struct nfs_client *clp, u32 program,
3939 int loop = 0; 3941 int loop = 0;
3940 int status; 3942 int status;
3941 3943
3942 nfs4_construct_boot_verifier(clp, &sc_verifier); 3944 nfs4_init_boot_verifier(clp, &sc_verifier);
3943 3945
3944 for(;;) { 3946 for(;;) {
3945 rcu_read_lock(); 3947 rcu_read_lock();
@@ -5099,7 +5101,7 @@ int nfs4_proc_exchange_id(struct nfs_client *clp, struct rpc_cred *cred)
5099 dprintk("--> %s\n", __func__); 5101 dprintk("--> %s\n", __func__);
5100 BUG_ON(clp == NULL); 5102 BUG_ON(clp == NULL);
5101 5103
5102 nfs4_construct_boot_verifier(clp, &verifier); 5104 nfs4_init_boot_verifier(clp, &verifier);
5103 5105
5104 args.id_len = scnprintf(args.id, sizeof(args.id), 5106 args.id_len = scnprintf(args.id, sizeof(args.id),
5105 "%s/%s/%u", 5107 "%s/%s/%u",