From: Ilya Dryomov Date: Fri, 23 Aug 2013 10:20:17 +0000 (+0300) Subject: Btrfs: add btrfs_alloc_device and switch to it X-Git-Tag: v3.12-rc1~40^2~38 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=12bd2fc0d2f589f9605b8f497eee2e7724f3af24;p=pandora-kernel.git Btrfs: add btrfs_alloc_device and switch to it Currently btrfs_device is allocated ad-hoc in a few different places, and as a result not all fields are initialized properly. In particular, readahead state is only initialized in device_list_add (at scan time), and not in btrfs_init_new_device (when the new device is added with 'btrfs dev add'). Fix this by adding an allocation helper and switch everybody but __btrfs_close_devices to it. (__btrfs_close_devices is dealt with in a later commit.) Signed-off-by: Ilya Dryomov Signed-off-by: Josef Bacik Signed-off-by: Chris Mason --- Reading git-diff-tree failed