提交 06b43672 编写于 作者: J Jeff Layton 提交者: Steve French

cifs: fix page refcount leak

Commit 315e995c is causing OOM kills
when stress-testing a CIFS filesystem. The VFS readpages operation takes
a page reference. The older code just handed this reference off to the
page cache, but the new code takes an extra one. The simplest fix is to
put the new reference after add_to_page_cache_lru.
Signed-off-by: NJeff Layton <jlayton@redhat.com>
Acked-by: NNick Piggin <npiggin@suse.de>
Signed-off-by: NSteve French <sfrench@us.ibm.com>
上级 67a3e12b
......@@ -1952,6 +1952,7 @@ static void cifs_copy_cache_pages(struct address_space *mapping,
bytes_read -= PAGE_CACHE_SIZE;
continue;
}
page_cache_release(page);
target = kmap_atomic(page, KM_USER0);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册