X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=fs%2Fbio.c;h=98711647ece49548a94409a99ce4b680ee085ca1;hb=afc1e702e8e8355faa712d4e90d9afe26a4995a5;hp=7bbc98f0eda151d27e22a720998a5f8480ce78f6;hpb=ff91fad2db543325d7221c26ff42d7df3c574064;p=firefly-linux-kernel-4.4.55.git diff --git a/fs/bio.c b/fs/bio.c index 7bbc98f0eda1..98711647ece4 100644 --- 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);