diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2020-07-23 21:33:41 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-08-03 05:39:44 +0200 |
commit | c6fe44d96fc1536af5b11cd859686453d1b7bfd1 (patch) | |
tree | 189b4815c4bc68a6bd65c833f6b38cc7ca4088fb /mm/filemap.c | |
parent | mm: rewrite wait_on_page_bit_common() logic (diff) | |
download | linux-c6fe44d96fc1536af5b11cd859686453d1b7bfd1.tar.xz linux-c6fe44d96fc1536af5b11cd859686453d1b7bfd1.zip |
list: add "list_del_init_careful()" to go with "list_empty_careful()"
That gives us ordering guarantees around the pair.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to '')
-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 8c3d3e233d37..991503bbf922 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -1041,13 +1041,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; } |