summaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4state.c
diff options
context:
space:
mode:
authorTrond Myklebust2012-04-21 01:24:51 +0200
committerTrond Myklebust2012-04-21 05:14:28 +0200
commit95b72eb0bdef6476b7e73061f0382adf46c5495a (patch)
treedb1cbb01793ac5f744defb73e869373fefb7d0ce /fs/nfs/nfs4state.c
parentnfs: Enclose hostname in brackets when needed in nfs_do_root_mount (diff)
downloadkernel-qcow2-linux-95b72eb0bdef6476b7e73061f0382adf46c5495a.tar.gz
kernel-qcow2-linux-95b72eb0bdef6476b7e73061f0382adf46c5495a.tar.xz
kernel-qcow2-linux-95b72eb0bdef6476b7e73061f0382adf46c5495a.zip
NFSv4: Ensure we do not reuse open owner names
The NFSv4 spec is ambiguous about whether or not it is permissible to reuse open owner names, so play it safe. This patch adds a timestamp to the state_owner structure, and combines that with the IDA based uniquifier. Fixes a regression whereby the Linux server returns NFS4ERR_BAD_SEQID. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4state.c')
-rw-r--r--fs/nfs/nfs4state.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index 0f43414eb25a..3b07f094f3a9 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -393,6 +393,7 @@ nfs4_remove_state_owner_locked(struct nfs4_state_owner *sp)
static void
nfs4_init_seqid_counter(struct nfs_seqid_counter *sc)
{
+ sc->create_time = ktime_get();
sc->flags = 0;
sc->counter = 0;
spin_lock_init(&sc->lock);