On Fri, Sep 02, 2022 at 05:09:38PM +0800, Anand Jain wrote: > commit 770c79fb65506fc7c16459855c3839429f46cb32 upstream > > Identifying and removing the stale device from the fs_uuids list is done > by btrfs_free_stale_devices(). btrfs_free_stale_devices() in turn > depends on device_path_matched() to check if the device appears in more > than one btrfs_device structure. > > The matching of the device happens by its path, the device path. However, > when device mapper is in use, the dm device paths are nothing but a link > to the actual block device, which leads to the device_path_matched() > failing to match. > > Fix this by matching the dev_t as provided by lookup_bdev() instead of > plain string compare of the device paths. > > CC: stable@xxxxxxxxxxxxxxx #5.4 > Reported-by: Josef Bacik <josef@xxxxxxxxxxxxxx> > Signed-off-by: Anand Jain <anand.jain@xxxxxxxxxx> > Signed-off-by: David Sterba <dsterba@xxxxxxxx> > --- > fs/btrfs/volumes.c | 44 +++++++++++++++++++++++++++++++++++++------- > 1 file changed, 37 insertions(+), 7 deletions(-) What about the same change for 5.10.y? thanks, greg k-h