m68k: Truncate base in do_div()
authorAndreas Schwab <schwab@linux-m68k.org>
Fri, 9 Aug 2013 13:14:08 +0000 (15:14 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Tue, 10 Sep 2013 00:57:24 +0000 (01:57 +0100)
commit595886031f65c6940b4f74703c041275cd833655
treef7c49e90817f06655af90e05c55a2132a55b8d33
parent52bd8a0804eda6fde7f25ab24caf8dcb6d40da9e
m68k: Truncate base in do_div()

commit ea077b1b96e073eac5c3c5590529e964767fc5f7 upstream.

Explicitly truncate the second operand of do_div() to 32 bits to guard
against bogus code calling it with a 64-bit divisor.

[Thorsten]

After upgrading from 3.2 to 3.10, mounting a btrfs volume fails with:

btrfs: setting nodatacow, compression disabled
btrfs: enabling auto recovery
btrfs: disk space caching is enabled
arch/m68k/include/asm/div64.h