From: Stefan Behrens Date: Wed, 14 Nov 2012 18:57:29 +0000 (+0000) Subject: Btrfs: fix BUG() in scrub when first superblock reading gives EIO X-Git-Tag: v3.8-rc1~71^2~6 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ded4f639533ed5f02a0f0ab20d43bb9659c91f8;p=pandora-kernel.git Btrfs: fix BUG() in scrub when first superblock reading gives EIO This fixes a very special case that can be reproduced by just disconnecting a disk at runtime, and without unmounting the filesystem first, start scrub on the filesystem with the disconnected disk. All read and write EIOs are handled correctly, only the first superblock is an exception and gives a BUG() in a subfunction. The BUG() is correct, it would crash later otherwise. The subfunction must not be called for superblocks and this is what the fix changes. Reported-by: Joeri Vanthienen Signed-off-by: Stefan Behrens Signed-off-by: Chris Mason --- Reading git-diff-tree failed