From: Xiao Guangrong Date: Wed, 20 Apr 2011 10:07:30 +0000 (+0000) Subject: Btrfs: fix the race between reading and updating devices X-Git-Tag: v3.0-rc1~38^2~5^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c9513edb0079f97749c2ac00c887a22c4ba44792;p=pandora-kernel.git Btrfs: fix the race between reading and updating devices On btrfs_congested_fn and __unplug_io_fn paths, we should hold device_list_mutex to avoid remove/add device path to update fs_devices->devices On __btrfs_close_devices and btrfs_prepare_sprout paths, the devices in fs_devices->devices or fs_devices->devices is updated, so we should hold the mutex to avoid the reader side to reach them Signed-off-by: Xiao Guangrong Signed-off-by: Chris Mason --- Reading git-diff-tree failed