Skip to content

Commit

Permalink
fuse: don't check refcount after stealing page
Browse files Browse the repository at this point in the history
page_count() is unstable.  Unless there has been an RCU grace period
between when the page was removed from the page cache and now, a
speculative reference may exist from the page cache.

Reported-by: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
  • Loading branch information
Miklos Szeredi committed May 19, 2020
1 parent a5005c3 commit 32f9887
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion fs/fuse/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,6 @@ static int fuse_check_page(struct page *page)
{
if (page_mapcount(page) ||
page->mapping != NULL ||
page_count(page) != 1 ||
(page->flags & PAGE_FLAGS_CHECK_AT_PREP &
~(1 << PG_locked |
1 << PG_referenced |
Expand Down

0 comments on commit 32f9887

Please sign in to comment.