We will implement the function that the filesystem scan all the devices in the system and build the device set for btrfs. In this case, we needn't get btrfs_fs_devices when adding a device into list. This patch changes device_add_list and implement this feature.
Signed-off-by: Miao Xie <mi...@cn.fujitsu.com> --- fs/btrfs/volumes.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 1aacf5f..740a4f9 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -568,7 +568,8 @@ static noinline int device_list_add(const char *path, if (!fs_devices->opened) device->generation = found_transid; - *fs_devices_ret = fs_devices; + if (fs_devices_ret) + *fs_devices_ret = fs_devices; return ret; } -- 1.9.3 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html