From: Josef Bacik Date: Sat, 20 Aug 2011 12:29:51 +0000 (-0400) Subject: Btrfs: fix 64 bit divide problem X-Git-Tag: v3.1-rc3~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6719db6a23d4b7f1e5052eedae394135e3aef9c1;p=pandora-kernel.git Btrfs: fix 64 bit divide problem This fixes a regression introduced by commit cdcb725c05fe ("Btrfs: check if there is enough space for balancing smarter"). We can't do 64-bit divides on 32-bit architectures. In cases where we need to divide/multiply by 2 we should just left/right shift respectively, and in cases where theres N number of devices use do_div. Also make the counters u64 to match up with rw_devices. Thanks, Signed-off-by: Josef Bacik Acked-and-tested-by: Ingo Molnar Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed