diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-02-09 15:31:36 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-02-29 16:30:55 -0800 |
commit | 0cea513e395f2a2d4dd650eeae8a1c08a7425296 (patch) | |
tree | 3e0b8496d901f181c4c75b52d3c8656913db3b2c /fs/nfs/nfs4state.c | |
parent | 4a818b4288d5a897b0e928dd0cd1e1e29501159f (diff) |
NFSv4: Ensure we throw out bad delegation stateids on NFS4ERR_BAD_STATEID
commit b9f9a03150969e4bd9967c20bce67c4de769058f upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/nfs/nfs4state.c')
-rw-r--r-- | fs/nfs/nfs4state.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index 6a7107ae6b72..a58eed784aed 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c @@ -1071,6 +1071,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); } |