mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
NFS: Use raw_write_seqcount_begin/end int nfs4_reclaim_open_state
commit abbec2da13 upstream.
The addition of lockdep code to write_seqcount_begin/end has lead to
a bunch of false positive claims of ABBA deadlocks with the so_lock
spinlock. Audits show that this simply cannot happen because the
read side code does not spin while holding so_lock.
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
98d9b492be
commit
02c098bcaa
@@ -1456,7 +1456,7 @@ static int nfs4_reclaim_open_state(struct nfs4_state_owner *sp, const struct nfs
|
|||||||
* server that doesn't support a grace period.
|
* server that doesn't support a grace period.
|
||||||
*/
|
*/
|
||||||
spin_lock(&sp->so_lock);
|
spin_lock(&sp->so_lock);
|
||||||
write_seqcount_begin(&sp->so_reclaim_seqcount);
|
raw_write_seqcount_begin(&sp->so_reclaim_seqcount);
|
||||||
restart:
|
restart:
|
||||||
list_for_each_entry(state, &sp->so_states, open_states) {
|
list_for_each_entry(state, &sp->so_states, open_states) {
|
||||||
if (!test_and_clear_bit(ops->state_flag_bit, &state->flags))
|
if (!test_and_clear_bit(ops->state_flag_bit, &state->flags))
|
||||||
@@ -1519,13 +1519,13 @@ restart:
|
|||||||
spin_lock(&sp->so_lock);
|
spin_lock(&sp->so_lock);
|
||||||
goto restart;
|
goto restart;
|
||||||
}
|
}
|
||||||
write_seqcount_end(&sp->so_reclaim_seqcount);
|
raw_write_seqcount_end(&sp->so_reclaim_seqcount);
|
||||||
spin_unlock(&sp->so_lock);
|
spin_unlock(&sp->so_lock);
|
||||||
return 0;
|
return 0;
|
||||||
out_err:
|
out_err:
|
||||||
nfs4_put_open_state(state);
|
nfs4_put_open_state(state);
|
||||||
spin_lock(&sp->so_lock);
|
spin_lock(&sp->so_lock);
|
||||||
write_seqcount_end(&sp->so_reclaim_seqcount);
|
raw_write_seqcount_end(&sp->so_reclaim_seqcount);
|
||||||
spin_unlock(&sp->so_lock);
|
spin_unlock(&sp->so_lock);
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user