v3: pull out unnecessary state match checks. V2 cover letter follows: Cover letter this time explaining the v2: Anna helped me find that the first version's stable fix was wrong, but was fixed by the refactor patch that followed. After putting in the logic to fix the stable version, it was messy enough that it made more sense to squash the two patches together. So, this time the first patch does rewrite nfs_need_update_open_stateid a bit more in order to handle both cases: - where two OPENs race to NFS_OPEN_STATE and the second wins - where an OPEN and CLOSE+1 race to update nfs4_state and CLOSE+1 wins The end result is that these two patches are code-equivalent to the first three. (It is still getting one final run through my testing, but I haven't delayed posting for that). Benjamin Coddington (2): NFSv4: Fix a livelock when CLOSE pre-emptively bumps state sequence NFSv4: cleanup unused zero_stateid copy fs/nfs/nfs4proc.c | 16 +++++++++------- fs/nfs/nfs4state.c | 8 ++------ 2 files changed, 11 insertions(+), 13 deletions(-) -- 2.20.1