summaryrefslogtreecommitdiff
path: root/block/blk-settings.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2024-04-04 17:03:18 -0700
committerJakub Kicinski <kuba@kernel.org>2024-04-04 18:01:07 -0700
commitcf1ca1f66d301a55ab8e79188ddf347a8d011e35 (patch)
tree3482f65987c61b1e46b5862352c8f45ac30442e6 /block/blk-settings.c
parent1148c4098e918b4ffb3cc222b897c465328d2391 (diff)
parentc88b9b4cde17aec34fb9bfaf69f9f72a1c44f511 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Cross-merge networking fixes after downstream PR. Conflicts: net/ipv4/ip_gre.c 17af420545a7 ("erspan: make sure erspan_base_hdr is present in skb->head") 5832c4a77d69 ("ip_tunnel: convert __be16 tunnel flags to bitmaps") https://lore.kernel.org/all/20240402103253.3b54a1cf@canb.auug.org.au/ Adjacent changes: net/ipv6/ip6_fib.c d21d40605bca ("ipv6: Fix infinite recursion in fib6_dump_done().") 5fc68320c1fb ("ipv6: remove RTNL protection from inet6_dump_fib()") Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'block/blk-settings.c')
-rw-r--r--block/blk-settings.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/block/blk-settings.c b/block/blk-settings.c
index 3c7d8d638ab5..cdbaef159c4b 100644
--- a/block/blk-settings.c
+++ b/block/blk-settings.c
@@ -146,8 +146,7 @@ static int blk_validate_limits(struct queue_limits *lim)
max_hw_sectors = min_not_zero(lim->max_hw_sectors,
lim->max_dev_sectors);
if (lim->max_user_sectors) {
- if (lim->max_user_sectors > max_hw_sectors ||
- lim->max_user_sectors < PAGE_SIZE / SECTOR_SIZE)
+ if (lim->max_user_sectors < PAGE_SIZE / SECTOR_SIZE)
return -EINVAL;
lim->max_sectors = min(max_hw_sectors, lim->max_user_sectors);
} else {