Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dm-crypt: start allocating with MAX_ORDER

Commit 23baf831a32c ("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>

authored by

Mikulas Patocka and committed by
Mike Snitzer
13648e04 28f07f2a

+1 -1
+1 -1
drivers/md/dm-crypt.c
··· 1673 1673 unsigned int nr_iovecs = (size + PAGE_SIZE - 1) >> PAGE_SHIFT; 1674 1674 gfp_t gfp_mask = GFP_NOWAIT | __GFP_HIGHMEM; 1675 1675 unsigned int remaining_size; 1676 - unsigned int order = MAX_ORDER - 1; 1676 + unsigned int order = MAX_ORDER; 1677 1677 1678 1678 retry: 1679 1679 if (unlikely(gfp_mask & __GFP_DIRECT_RECLAIM))