Commit 0cc380d0 authored by Fushuai Wang's avatar Fushuai Wang Committed by Steve French
Browse files

cifs: Fix copy_to_iter return value check



The return value of copy_to_iter() function will never be negative,
it is the number of bytes copied, or zero if nothing was copied.
Update the check to treat 0 as an error, and return -1 in that case.

Fixes: d08089f6 ("cifs: Change the I/O paths to use an iterator rather than a page list")
Acked-by: default avatarTom Talpey <tom@talpey.com>
Reviewed-by: default avatarDavid Howells <dhowells@redhat.com>
Signed-off-by: default avatarFushuai Wang <wangfushuai@baidu.com>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent 68d2e2ca
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment