Skip to content

Commit 13648e0

Browse files
Mikulas PatockaMike Snitzer
authored andcommitted
dm-crypt: start allocating with MAX_ORDER
Commit 23baf83 ("mm, treewide: redefine MAX_ORDER sanely") changed the meaning of MAX_ORDER from exclusive to inclusive. So, we can allocate compound pages with up to 1 << MAX_ORDER pages. Reflect this change in dm-crypt and start trying to allocate compound pages with MAX_ORDER. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Mike Snitzer <snitzer@kernel.org>
1 parent 28f07f2 commit 13648e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/md/dm-crypt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1673,7 +1673,7 @@ static struct bio *crypt_alloc_buffer(struct dm_crypt_io *io, unsigned int size)
16731673
unsigned int nr_iovecs = (size + PAGE_SIZE - 1) >> PAGE_SHIFT;
16741674
gfp_t gfp_mask = GFP_NOWAIT | __GFP_HIGHMEM;
16751675
unsigned int remaining_size;
1676-
unsigned int order = MAX_ORDER - 1;
1676+
unsigned int order = MAX_ORDER;
16771677

16781678
retry:
16791679
if (unlikely(gfp_mask & __GFP_DIRECT_RECLAIM))

0 commit comments

Comments
 (0)