Re: [PATCH v2 1/3] btrfs: scrub: maintain the unlock order in scrub thread

2018-11-29 Thread Anand Jain
On 11/29/2018 06:36 PM, Filipe Manana wrote: On Thu, Nov 29, 2018 at 9:27 AM Anand Jain wrote: The device_list_mutex and scrub_lock creates a nested locks in btrfs_scrub_dev(). During lock the order is device_list_mutex and then scrub_lock, and during unlock, the order is

Re: [PATCH v2 1/3] btrfs: scrub: maintain the unlock order in scrub thread

2018-11-29 Thread Filipe Manana
On Thu, Nov 29, 2018 at 9:27 AM Anand Jain wrote: > > The device_list_mutex and scrub_lock creates a nested locks in > btrfs_scrub_dev(). > > During lock the order is device_list_mutex and then scrub_lock, and during > unlock, the order is device_list_mutex and then scrub_lock. > Fix this to the

[PATCH v2 1/3] btrfs: scrub: maintain the unlock order in scrub thread

2018-11-29 Thread Anand Jain
The device_list_mutex and scrub_lock creates a nested locks in btrfs_scrub_dev(). During lock the order is device_list_mutex and then scrub_lock, and during unlock, the order is device_list_mutex and then scrub_lock. Fix this to the lock order of scrub_lock and then device_list_mutex.