Commit ba683031 authored by Trond Myklebust's avatar Trond Myklebust

NFSv4: Fix a locking regression in nfs4_set_mode_locked()

We don't really need to clear &state->inode_states inside
nfs4_set_mode_locked, and doing so without holding the inode->i_lock would
in any case be a bug...
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 5e11934d
......@@ -341,8 +341,6 @@ nfs4_state_set_mode_locked(struct nfs4_state *state, mode_t mode)
else
list_move_tail(&state->open_states, &state->owner->so_states);
}
if (mode == 0)
list_del_init(&state->inode_states);
state->state = mode;
}
......@@ -415,7 +413,6 @@ void nfs4_put_open_state(struct nfs4_state *state)
if (!atomic_dec_and_lock(&state->count, &owner->so_lock))
return;
spin_lock(&inode->i_lock);
if (!list_empty(&state->inode_states))
list_del(&state->inode_states);
list_del(&state->open_states);
spin_unlock(&inode->i_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment