Skip to content
Commit c6f62f81 authored by Matthew Wilcox (Oracle)'s avatar Matthew Wilcox (Oracle) Committed by Steve French
Browse files

cifs: Fix memory leak when using fscache



If we hit the 'index == next_cached' case, we leak a refcount on the
struct page.  Fix this by using readahead_folio() which takes care of
the refcount for you.

Fixes: 0174ee99 ("cifs: Implement cache I/O by accessing the cache directly")
Cc: David Howells <dhowells@redhat.com>
Cc: Jeff Layton <jlayton@kernel.org>
Signed-off-by: default avatarMatthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent 89e42f49
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment