diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-28 19:06:48 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-28 19:06:48 -0400 |
commit | 2d04f6b9bc91540b8e931a0700440118161092e0 (patch) | |
tree | 465e71032f1494af5548204871d623dc00a59018 /fs | |
parent | 8b86bd7a4a82157d386aebafbe1bdf26bdf3d713 (diff) | |
parent | 69838727bcd819a8fd73a88447801221788b0c6d (diff) |
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
bio: fix memcpy corruption in bio_copy_user_iov()
hd: fix locking
mg_disk: fix CONFIG_LBD=y warning
mg_disk: fix locking
Diffstat (limited to 'fs')
-rw-r--r-- | fs/bio.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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); |