Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a2d6b6ca authored by Pavel Shilovsky's avatar Pavel Shilovsky Committed by Steve French
Browse files

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: default avatarPavel Shilovsky <piastry@etersoft.ru>
Reviewed-by: default avatarJeff Layton <jlayton@redhat.com>
Signed-off-by: default avatarSteve French <smfrench@gmail.com>
parent b957ae9c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
		}