]> 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>
Wed, 5 Apr 2023 23:02:21 +0000 (16:02 -0700)
commit0eaaf621dc2f88e9d378cebbe057cdbfd38c4031
treeb3a14f887a5612340b198cde10e1d694d6d721b4
parentc09dd1f52837f80fadedcf69869a63cc0142b8cf
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