NFSv4: Fix the return value of nfs4_select_rw_stateid
authorTrond Myklebust <trond.myklebust@primarydata.com>
Tue, 4 Mar 2014 18:12:03 +0000 (13:12 -0500)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Wed, 5 Mar 2014 16:55:24 +0000 (11:55 -0500)
commitb03d682fd649467b999d406b433f79c167d55718
tree8fed892e6372e17d73a5b7c31083a63555b8d25b
parentf1f328f3dd544e76c5fc98575930f62ec60f328a
NFSv4: Fix the return value of nfs4_select_rw_stateid

In commit 69af61ea451ed (NFSv4: Resend the READ/WRITE RPC call
if a stateid change causes an error), we overloaded the return value of
nfs4_select_rw_stateid() to cause it to return -EWOULDBLOCK if an RPC
call is outstanding that would cause the NFSv4 lock or open stateid
to change.
That is all redundant when we actually copy the stateid used in the
read/write RPC call that failed, and check that against the current
stateid. It is doubly so, when we consider that in the NFSv4.1 case,
we also set the stateid's seqid to the special value '0', which means
'match the current valid stateid'.

Reported-by: Andy Adamson <andros@netapp.com>
Link: http://lkml.kernel.org/r/1393954269-3974-1-git-send-email-andros@netapp.com
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
fs/nfs/nfs4state.c