btrfs: Fix 64 bit divide problem
commitc63d4448c5fc695b3793b9d93f02d59f5af18460
authorJosef Bacik <josef@redhat.com>
Sat, 20 Aug 2011 12:29:51 +0000 (20 08:29 -0400)
committerIngo Molnar <mingo@elte.hu>
Sun, 21 Aug 2011 06:41:46 +0000 (21 08:41 +0200)
tree7a56ba9ce49ee5387922e04b0ef97d28620bfc53
parent07bd359bb4767ee2f9ce2c77e2acf3e287fb73c3
btrfs: Fix 64 bit divide problem

This fixes a regression introduced by

cdcb725c05fe0cb71777c66ddc2445fedbbb3c59

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.

Signed-off-by: Josef Bacik <josef@redhat.com>
Cc: torvalds@linux-foundation.org
Cc: liubo2009@cn.fujitsu.com
Link: http://lkml.kernel.org/r/1313843391-3904-1-git-send-email-josef@redhat.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
fs/btrfs/extent-tree.c