summaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4state.c
diff options
context:
space:
mode:
authorBenny Halevy2009-04-01 15:22:52 +0200
committerBenny Halevy2009-06-17 21:43:45 +0200
commit34dc1ad752ad3f55b2a6e6cd8cfcf3504682fec7 (patch)
tree8816d7038c09eae46e2da51561f2e80cc91063e0 /fs/nfs/nfs4state.c
parentnfs41: only retry EXCHANGE_ID on recoverable errors (diff)
downloadkernel-qcow2-linux-34dc1ad752ad3f55b2a6e6cd8cfcf3504682fec7.tar.gz
kernel-qcow2-linux-34dc1ad752ad3f55b2a6e6cd8cfcf3504682fec7.tar.xz
kernel-qcow2-linux-34dc1ad752ad3f55b2a6e6cd8cfcf3504682fec7.zip
nfs41: increment_{open,lock}_seqid
Unlike minorversion0, in nfsv4.1 the open and lock seqids need not be incremented by the client and should always be set to zero. This is implemented using a new nfs_rpc_ops methods - increment_open_seqid and increment_lock_seqid Signed-off-by: Rahul Iyer <iyer@netapp.com> Signed-off-by: Benny Halevy <bhalevy@panasas.com> [nfs41: check for session not minorversion] Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4state.c')
-rw-r--r--fs/nfs/nfs4state.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index 2cc0aca96eb2..2cfca9929c9a 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -742,12 +742,14 @@ static void nfs_increment_seqid(int status, struct nfs_seqid *seqid)
void nfs_increment_open_seqid(int status, struct nfs_seqid *seqid)
{
- if (status == -NFS4ERR_BAD_SEQID) {
- struct nfs4_state_owner *sp = container_of(seqid->sequence,
- struct nfs4_state_owner, so_seqid);
+ struct nfs4_state_owner *sp = container_of(seqid->sequence,
+ struct nfs4_state_owner, so_seqid);
+ struct nfs_server *server = sp->so_server;
+
+ if (status == -NFS4ERR_BAD_SEQID)
nfs4_drop_state_owner(sp);
- }
- nfs_increment_seqid(status, seqid);
+ if (!nfs4_has_session(server->nfs_client))
+ nfs_increment_seqid(status, seqid);
}
/*