diff options
| author | NeilBrown <[email protected]> | 2024-08-30 07:03:17 +0000 |
|---|---|---|
| committer | Chuck Lever <[email protected]> | 2024-09-20 23:31:03 +0000 |
| commit | 15392c8cd13449bf0c09faf8e78ca2fdfb023284 (patch) | |
| tree | c2fc3be707862bd648d5456c3eafecfb8adb5305 /fs/ext4/fast_commit.c | |
| parent | nfsd: use clear_and_wake_up_bit() (diff) | |
| download | kernel-15392c8cd13449bf0c09faf8e78ca2fdfb023284.tar.gz kernel-15392c8cd13449bf0c09faf8e78ca2fdfb023284.zip | |
nfsd: avoid races with wake_up_var()
wake_up_var() needs a barrier after the important change is made in the
var and before wake_up_var() is called, else it is possible that a wake
up won't be sent when it should.
In each case here the var is changed in an "atomic" manner, so
smb_mb__after_atomic() is sufficient.
In one case the important change (removing the lease) is performed
*after* the wake_up, which is backwards. The code survives in part
because the wait_var_event is given a timeout.
This patch adds the required barriers and calls destroy_delegation()
*before* waking any threads waiting for the delegation to be destroyed.
Signed-off-by: NeilBrown <[email protected]>
Reviewed-by: Jeff Layton <[email protected]>
Signed-off-by: Chuck Lever <[email protected]>
Diffstat (limited to 'fs/ext4/fast_commit.c')
0 files changed, 0 insertions, 0 deletions
