Merge branch 'master' into for-2.6.31
[firefly-linux-kernel-4.4.55.git] / fs / bio.c
index ee3bc67833d2bd24ff2dff6daad4da3a0e9b2efb..81dc93e72535f299b8df7687a2cfa818fcbe4d00 100644 (file)
--- a/fs/bio.c
+++ b/fs/bio.c
@@ -817,6 +817,9 @@ struct bio *bio_copy_user_iov(struct request_queue *q,
                len += iov[i].iov_len;
        }
 
+       if (offset)
+               nr_pages++;
+
        bmd = bio_alloc_map_data(nr_pages, iov_count, gfp_mask);
        if (!bmd)
                return ERR_PTR(-ENOMEM);