We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 075aa2a + 8324bb7 commit b398f43Copy full SHA for b398f43
block/blk-settings.c
@@ -175,7 +175,6 @@ static void blk_atomic_writes_update_limits(struct queue_limits *lim)
175
176
static void blk_validate_atomic_write_limits(struct queue_limits *lim)
177
{
178
- unsigned int chunk_sectors = lim->chunk_sectors;
179
unsigned int boundary_sectors;
180
181
if (!lim->atomic_write_hw_max)
@@ -197,7 +196,7 @@ static void blk_validate_atomic_write_limits(struct queue_limits *lim)
197
196
* Devices which do not conform to these rules can be dealt
198
* with if and when they show up.
199
*/
200
- if (WARN_ON_ONCE(do_div(chunk_sectors, boundary_sectors)))
+ if (WARN_ON_ONCE(lim->chunk_sectors % boundary_sectors))
201
goto unsupported;
202
203
/*
0 commit comments