diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2020-07-23 22:33:41 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-06-28 11:18:35 +0300 |
commit | e77e5481d5bfd6dad8c00229681ba59c89668be7 (patch) | |
tree | 6b11ed9cddd15c8191f7c802114750e6bd518583 /mm | |
parent | c32ab1c1959ab457e5eeab5c02352d8c02601243 (diff) | |
download | linux-e77e5481d5bfd6dad8c00229681ba59c89668be7.tar.xz |
list: add "list_del_init_careful()" to go with "list_empty_careful()"
[ Upstream commit c6fe44d96fc1536af5b11cd859686453d1b7bfd1 ]
That gives us ordering guarantees around the pair.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Stable-dep-of: 2192bba03d80 ("epoll: ep_autoremove_wake_function should use list_del_init_careful")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/filemap.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/mm/filemap.c b/mm/filemap.c index 83b324420046..a106d63e8467 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -1085,13 +1085,8 @@ static int wake_page_function(wait_queue_entry_t *wait, unsigned mode, int sync, * since after list_del_init(&wait->entry) the wait entry * might be de-allocated and the process might even have * exited. - * - * We _really_ should have a "list_del_init_careful()" to - * properly pair with the unlocked "list_empty_careful()" - * in finish_wait(). */ - smp_mb(); - list_del_init(&wait->entry); + list_del_init_careful(&wait->entry); return ret; } |