aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/bio.c3
1 files changed, 3 insertions, 0 deletions
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,
817 len += iov[i].iov_len; 817 len += iov[i].iov_len;
818 } 818 }
819 819
820 if (offset)
821 nr_pages++;
822
820 bmd = bio_alloc_map_data(nr_pages, iov_count, gfp_mask); 823 bmd = bio_alloc_map_data(nr_pages, iov_count, gfp_mask);
821 if (!bmd) 824 if (!bmd)
822 return ERR_PTR(-ENOMEM); 825 return ERR_PTR(-ENOMEM);