提交 a2d6b6ca 编写于 作者: P Pavel Shilovsky 提交者: Steve French

CIFS: Fix error handling in cifs_readv_complete

In cifs_readv_receive we don't update rdata->result to error value
after kmap'ing a page. We should kunmap the page in the no error
case only.
Signed-off-by: NPavel Shilovsky <piastry@etersoft.ru>
Reviewed-by: NJeff Layton <jlayton@redhat.com>
Signed-off-by: NSteve French <smfrench@gmail.com>
上级 b957ae9c
......@@ -1619,9 +1619,9 @@ cifs_readv_complete(struct work_struct *work)
list_for_each_entry_safe(page, tpage, &rdata->pages, lru) {
list_del(&page->lru);
lru_cache_add_file(page);
kunmap(page);
if (rdata->result == 0) {
kunmap(page);
flush_dcache_page(page);
SetPageUptodate(page);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册