From: Ilya Dryomov Date: Sun, 1 Sep 2013 15:56:44 +0000 (+0300) Subject: Btrfs: do not add replace target to the alloc_list X-Git-Tag: v3.12-rc2~5^2~23 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=55e50e458e760f4d0c183978dcc20b07a7f6e20e;p=pandora-kernel.git Btrfs: do not add replace target to the alloc_list If replace was suspended by the umount, replace target device is added to the fs_devices->alloc_list during a later mount. This is obviously wrong. ->is_tgtdev_for_dev_replace is supposed to guard against that, but ->is_tgtdev_for_dev_replace is (and can only ever be) initialized *after* everything is opened and fs_devices lists are populated. Fix this by checking the devid instead: for replace targets it's always equal to BTRFS_DEV_REPLACE_DEVID. Cc: Stefan Behrens Signed-off-by: Ilya Dryomov Reviewed-by: Stefan Behrens Signed-off-by: Josef Bacik Signed-off-by: Chris Mason --- Reading git-diff-tree failed