avoid returning success when it should report failure, preventing
odd behavior in caller.

Signed-off-by: Kanchan Joshi <josh...@samsung.com>
Signed-off-by: Selvakumar S <selvakuma...@samsung.com>
Signed-off-by: Nitesh Shetty <nj.she...@samsung.com>
Signed-off-by: Javier Gonzalez <javier.g...@samsung.com>
---
 block/bio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/bio.c b/block/bio.c
index a7366c0..0cecdbc 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -1044,7 +1044,7 @@ static int __bio_iov_append_get_pages(struct bio *bio, 
struct iov_iter *iter)
        size_t offset;
 
        if (WARN_ON_ONCE(!max_append_sectors))
-               return 0;
+               return -EINVAL;
 
        /*
         * Move page array up in the allocated memory for the bio vecs as far as
-- 
2.7.4

Reply via email to