]> www.infradead.org Git - users/jedix/linux-maple.git/commit
floppy: fix MAX_ORDER usage
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Wed, 15 Mar 2023 11:31:26 +0000 (14:31 +0300)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 28 Mar 2023 23:25:01 +0000 (16:25 -0700)
commitbf21ac7370d3392b24d00eab89270a76788c84ab
tree929084accfea72ddf74334ab66d0ceb5fe86b0e5
parent8602ec9587960c49771cf4bd83bb2529f8ea9576
floppy: fix MAX_ORDER usage

MAX_ORDER is not inclusive: the maximum allocation order buddy allocator
can deliver is MAX_ORDER-1.

Fix MAX_ORDER usage in floppy code.

Also allocation buffer exactly PAGE_SIZE << MAX_ORDER bytes is okay. Fix
MAX_LEN check.

Link: https://lkml.kernel.org/r/20230315113133.11326-4-kirill.shutemov@linux.intel.com
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Acked-by: Mike Rapoport (IBM) <rppt@kernel.org>
Cc: Denis Efremov <efremov@linux.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/block/floppy.c