]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit792372e26e3b3c4819a854528f23e4e9820fe664
tree8fed892e6372e17d73a5b7c31083a63555b8d25b
parent0566f09979b20e798054c1e230cfb7a5dcd1ffe2
NFSv4: Fix the return value of nfs4_select_rw_stateid

In commit 58402083e48ed (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