diff options
author | J. Bruce Fields <bfields@redhat.com> | 2011-01-11 10:28:36 -0500 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2011-01-11 15:02:19 -0500 |
commit | a2c50f69168deec3f7e47644eb4ef4f8a3ee6910 (patch) | |
tree | 987197653dcdbf3d33a7c678dbef9cc884f36afa /block/blk-map.c | |
parent | 8c3df3e58cde676de4df9363c00f37dbfce08e5c (diff) | |
parent | 3c0eee3fe6a3a1c745379547c7e7c904aa64f6d5 (diff) | |
download | linux-a2c50f69168deec3f7e47644eb4ef4f8a3ee6910.tar.bz2 |
Merge commit 'v2.6.37' into for-2.6.38-incoming
I made a slight mess of Documentation/filesystems/Locking; resolve
conflicts with upstream before fixing it up.
Diffstat (limited to 'block/blk-map.c')
-rw-r--r-- | block/blk-map.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/block/blk-map.c b/block/blk-map.c index 5d5dbe47c228..e663ac2d8e68 100644 --- a/block/blk-map.c +++ b/block/blk-map.c @@ -201,12 +201,13 @@ int blk_rq_map_user_iov(struct request_queue *q, struct request *rq, for (i = 0; i < iov_count; i++) { unsigned long uaddr = (unsigned long)iov[i].iov_base; + if (!iov[i].iov_len) + return -EINVAL; + if (uaddr & queue_dma_alignment(q)) { unaligned = 1; break; } - if (!iov[i].iov_len) - return -EINVAL; } if (unaligned || (q->dma_pad_mask & len) || map_data) |