]> Pileus Git - ~andy/linux/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)
commit927864cd92aaad1d6285e3bb16e503caf3d6e27e
tree8fed892e6372e17d73a5b7c31083a63555b8d25b
parente1253be0ece1a95a02c7f5843194877471af8179
NFSv4: Fix the return value of nfs4_select_rw_stateid

In commit 5521abfdcf4d6 (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