summaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4state.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2012-02-09 15:31:36 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-02-09 15:59:21 -0500
commitb9f9a03150969e4bd9967c20bce67c4de769058f (patch)
tree0621ee547ab628d3bed40f32ccbfb60af5779d4b /fs/nfs/nfs4state.c
parent331818f1c468a24e581aedcbe52af799366a9dfe (diff)
downloadop-kernel-dev-b9f9a03150969e4bd9967c20bce67c4de769058f.zip
op-kernel-dev-b9f9a03150969e4bd9967c20bce67c4de769058f.tar.gz
NFSv4: Ensure we throw out bad delegation stateids on NFS4ERR_BAD_STATEID
To ensure that we don't just reuse the bad delegation when we attempt to recover the nfs4_state that received the bad stateid error. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Cc: stable@vger.kernel.org
Diffstat (limited to 'fs/nfs/nfs4state.c')
-rw-r--r--fs/nfs/nfs4state.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index a53f33b..4539203 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -1132,6 +1132,8 @@ void nfs4_schedule_stateid_recovery(const struct nfs_server *server, struct nfs4
{
struct nfs_client *clp = server->nfs_client;
+ if (test_and_clear_bit(NFS_DELEGATED_STATE, &state->flags))
+ nfs_async_inode_return_delegation(state->inode, &state->stateid);
nfs4_state_mark_reclaim_nograce(clp, state);
nfs4_schedule_state_manager(clp);
}
OpenPOWER on IntegriCloud