NFSv4: When reclaiming state, ensure that we zero the sequence ids. Signed-off-by: Trond Myklebust --- nfs4state.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletion(-) Index: linux-2.6.13-rc1/fs/nfs/nfs4state.c =================================================================== --- linux-2.6.13-rc1.orig/fs/nfs/nfs4state.c +++ linux-2.6.13-rc1/fs/nfs/nfs4state.c @@ -831,8 +831,11 @@ static int nfs4_reclaim_open_state(struc if (state->state == 0) continue; status = ops->recover_open(sp, state); - list_for_each_entry(lock, &state->lock_states, ls_locks) + /* Reset lockowner state */ + list_for_each_entry(lock, &state->lock_states, ls_locks) { lock->ls_flags &= ~NFS_LOCK_INITIALIZED; + lock->ls_seqid = 0; + } if (status >= 0) { status = nfs4_reclaim_locks(ops, state); if (status < 0) @@ -911,6 +914,8 @@ restart_loop: nfs_delegation_mark_reclaim(clp); /* Note: list is protected by exclusive lock on cl->cl_sem */ list_for_each_entry(sp, &clp->cl_state_owners, so_list) { + /* Reset open owner state */ + sp->so_seqid = 0; status = nfs4_reclaim_open_state(ops, sp); if (status < 0) { if (status == -NFS4ERR_NO_GRACE) {