David Howells 1744a22ae9 afs: Fix mmap
Fix afs_add_open_map() to check that the vnode isn't already on the list
when it adds it.  It's possible that afs_drop_open_mmap() decremented
the cb_nr_mmap counter, but hadn't yet got into the locked section to
remove it.

Also vnode->cb_mmap_link should be initialised, so fix that too.

Fixes: 6e0e99d58a65 ("afs: Fix mmap coherency vs 3rd-party changes")
Reported-by: kafs-testing+fedora34_64checkkafs-build-300@auristor.com
Suggested-by: Marc Dionne <marc.dionne@auristor.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Tested-by: kafs-testing+fedora34_64checkkafs-build-300@auristor.com
cc: linux-afs@lists.infradead.org
Link: https://lore.kernel.org/r/686465.1639435380@warthog.procyon.org.uk/ # v1
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2021-12-16 09:10:13 -08:00
..
2021-11-10 21:17:09 +00:00
2021-12-16 09:10:13 -08:00
2021-11-02 09:40:18 +00:00
2021-11-10 21:16:56 +00:00
2021-04-23 10:17:28 +01:00
2021-06-15 07:42:26 -07:00
2021-04-23 10:17:27 +01:00
2021-01-24 14:27:20 +01:00
2021-12-16 09:10:13 -08:00
2021-11-10 21:16:56 +00:00