pNFS: Fix LAYOUTGET handling of NFS4ERR_BAD_STATEID and NFS4ERR_EXPIRED
authorTrond Myklebust <trond.myklebust@primarydata.com>
Thu, 14 Jul 2016 19:14:02 +0000 (15:14 -0400)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Tue, 19 Jul 2016 20:23:23 +0000 (16:23 -0400)
commitf7db0b283868411dc6bc8a223fd032b211d2d91f
treecf7a2f7e1aee50843669d5c8548c1879b0725430
parent66b53f325876703b7ab815c482cd104609f8772c
pNFS: Fix LAYOUTGET handling of NFS4ERR_BAD_STATEID and NFS4ERR_EXPIRED

We want to recover the open stateid if there is no layout stateid
and/or the stateid argument matches an open stateid.
Otherwise throw out the existing layout and recover from scratch, as
the layout stateid is bad.

Fixes: 183d9e7b112aa ("pnfs: rework LAYOUTGET retry handling")
Cc: stable@vger.kernel.org # 4.7
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
fs/nfs/nfs4proc.c