diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2020-07-23 22:33:41 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-08-03 06:39:44 +0300 |
commit | c6fe44d96fc1536af5b11cd859686453d1b7bfd1 (patch) | |
tree | 189b4815c4bc68a6bd65c833f6b38cc7ca4088fb /mm/filemap.c | |
parent | 2a9127fcf2296674d58024f83981f40b128fffea (diff) | |
download | linux-c6fe44d96fc1536af5b11cd859686453d1b7bfd1.tar.xz |
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 'mm/filemap.c')
-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; } |