]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: don't BUG_ON() in btrfs_num_copies
authorJosef Bacik <jbacik@fusionio.com>
Tue, 23 Apr 2013 14:53:18 +0000 (10:53 -0400)
committerJosef Bacik <jbacik@fusionio.com>
Mon, 6 May 2013 19:55:04 +0000 (15:55 -0400)
commit0437e39b4693f0cbcba9434a358ca1ff8d5e5637
tree67e96d7bf0f389932e04367f2235e8d6a11d26a3
parent10261ede25cc8dfe227bfab1fae52fe0f2c7ef84
Btrfs: don't BUG_ON() in btrfs_num_copies

A user sent me a btrfs-image that was panicing because of some corruption.  This
is because we pass in a bogus value to btrfs_num_copies, and it panics.  Instead
just return 1.  We only call btrfs_num_copies to see if there are other copies
to try and read for things, so if we just return 1 it will make the callers exit
out with an appropriate error value.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
fs/btrfs/volumes.c