Re: [PATCH v2] btrfs: fix a possible umount deadlock

2016-09-21 Thread Anand Jain
On 09/21/2016 10:26 PM, David Sterba wrote: On Sat, Sep 10, 2016 at 07:03:38AM +0800, Anand Jain wrote: static int __btrfs_close_devices(struct btrfs_fs_devices *fs_devices) { struct btrfs_device *device, *tmp; + LIST_HEAD(pending_put); + INIT_LIST_HEAD(&pending_put); L

Re: [PATCH v2] btrfs: fix a possible umount deadlock

2016-09-21 Thread David Sterba
On Sat, Sep 10, 2016 at 07:03:38AM +0800, Anand Jain wrote: > static int __btrfs_close_devices(struct btrfs_fs_devices *fs_devices) > { > struct btrfs_device *device, *tmp; > + LIST_HEAD(pending_put); > + INIT_LIST_HEAD(&pending_put); LIST_HEAD declares and initializes the list to

[PATCH v2] btrfs: fix a possible umount deadlock

2016-09-09 Thread Anand Jain
btrfs_show_devname() is using the device_list_mutex, sometimes a call to blkdev_put() leads vfs calling into this func. So call blkdev_put() outside of device_list_mutex, as of now. [ 983.284212] == [ 983.290401] [ INFO: possible circular locki