projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
vhost/scsi: fix reuse of &vq->iov[out] in response
[firefly-linux-kernel-4.4.55.git]
/
block
/
blk-sysfs.c
diff --git
a/block/blk-sysfs.c
b/block/blk-sysfs.c
index 565b8dac578297edf327e7451dedfe80a75e5751..e140cc487ce11349ff1917e4e866eccf0a18106c 100644
(file)
--- a/
block/blk-sysfs.c
+++ b/
block/blk-sysfs.c
@@
-205,6
+205,9
@@
queue_max_sectors_store(struct request_queue *q, const char *page, size_t count)
if (ret < 0)
return ret;
+ max_hw_sectors_kb = min_not_zero(max_hw_sectors_kb, (unsigned long)
+ q->limits.max_dev_sectors >> 1);
+
if (max_sectors_kb > max_hw_sectors_kb || max_sectors_kb < page_kb)
return -EINVAL;