NFSv4: Fix a bug when the server returns NFS4ERR_RESOURCE
commit4886f073309eeb9d99d9f05d944f8b0874c60bbd
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Fri, 23 Oct 2009 18:46:42 +0000 (23 14:46 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 10 Nov 2009 00:23:01 +0000 (9 16:23 -0800)
treeb87ffe68223755cebe56e56261226d7eec512a00
parent2169536c156b6bc876c0a80e5cf98319cc3b9aab
NFSv4: Fix a bug when the server returns NFS4ERR_RESOURCE

commit 52567b03ca38b6e556ced450d64dba8d66e23b0e upstream.

RFC 3530 states that when we recieve the error NFS4ERR_RESOURCE, we are not
supposed to bump the sequence number on OPEN, LOCK, LOCKU, CLOSE, etc
operations. The problem is that we map that error into EREMOTEIO in the XDR
layer, and so the NFSv4 middle-layer routines like seqid_mutating_err(),
and nfs_increment_seqid() don't recognise it.

The fix is to defer the mapping until after the middle layers have
processed the error.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/nfs/nfs4proc.c
fs/nfs/nfs4xdr.c