]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
btrfs: do btrfs_free_stale_devices outside of device_list_add
authorAnand Jain <anand.jain@oracle.com>
Tue, 29 May 2018 04:28:37 +0000 (12:28 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 15 Sep 2018 07:46:56 +0000 (09:46 +0200)
commit2d4bbb81bac654db2d5e66887d0a3be704aab060
tree0398ecb22a55fdddf12a53008612f9e023ee41f9
parent8515518d6365f19bc40ef6f8b690145c641cb4eb
btrfs: do btrfs_free_stale_devices outside of device_list_add

[ Upstream commit 4306a97449f9a0f9e5229af7889d4401315355aa ]

btrfs_free_stale_devices() looks for device path reused for another
filesystem, and deletes the older fs_devices::device entry.

In preparation to handle locking in device_list_add, move
btrfs_free_stale_devices outside as these two functions serve a
different purpose.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/btrfs/volumes.c