aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk-map.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/blk-map.c')
-rw-r--r--block/blk-map.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block/blk-map.c b/block/blk-map.c
index ef2492adca7e..9083cf0180cc 100644
--- a/block/blk-map.c
+++ b/block/blk-map.c
@@ -115,7 +115,7 @@ int blk_rq_map_user(struct request_queue *q, struct request *rq,
115 struct bio *bio = NULL; 115 struct bio *bio = NULL;
116 int ret; 116 int ret;
117 117
118 if (len > (q->max_hw_sectors << 9)) 118 if (len > (queue_max_hw_sectors(q) << 9))
119 return -EINVAL; 119 return -EINVAL;
120 if (!len) 120 if (!len)
121 return -EINVAL; 121 return -EINVAL;
@@ -292,7 +292,7 @@ int blk_rq_map_kern(struct request_queue *q, struct request *rq, void *kbuf,
292 struct bio *bio; 292 struct bio *bio;
293 int ret; 293 int ret;
294 294
295 if (len > (q->max_hw_sectors << 9)) 295 if (len > (queue_max_hw_sectors(q) << 9))
296 return -EINVAL; 296 return -EINVAL;
297 if (!len || !kbuf) 297 if (!len || !kbuf)
298 return -EINVAL; 298 return -EINVAL;