Re: [PATCH V2] fs/ceph:fix double unlock in handle_cap_export()

2020-04-29 Thread Wu Bo
On 2020/4/30 10:50, Yan, Zheng wrote: On Wed, Apr 29, 2020 at 8:49 AM Wu Bo wrote: On 2020/4/28 22:48, Jeff Layton wrote: On Tue, 2020-04-28 at 21:13 +0800, Wu Bo wrote: if the ceph_mdsc_open_export_target_session() return fails, should add a lock to avoid twice unlocking. Because the lock

Re: [PATCH V2] fs/ceph:fix double unlock in handle_cap_export()

2020-04-29 Thread Yan, Zheng
On Wed, Apr 29, 2020 at 8:49 AM Wu Bo wrote: > > On 2020/4/28 22:48, Jeff Layton wrote: > > On Tue, 2020-04-28 at 21:13 +0800, Wu Bo wrote: > >> if the ceph_mdsc_open_export_target_session() return fails, > >> should add a lock to avoid twice unlocking. > >> Because the lock will be released at

Re: [PATCH V2] fs/ceph:fix double unlock in handle_cap_export()

2020-04-29 Thread Jeff Layton
On Wed, 2020-04-29 at 08:46 +0800, Wu Bo wrote: > On 2020/4/28 22:48, Jeff Layton wrote: > > On Tue, 2020-04-28 at 21:13 +0800, Wu Bo wrote: > > > if the ceph_mdsc_open_export_target_session() return fails, > > > should add a lock to avoid twice unlocking. > > > Because the lock will be released

Re: [PATCH V2] fs/ceph:fix double unlock in handle_cap_export()

2020-04-28 Thread Wu Bo
On 2020/4/28 22:48, Jeff Layton wrote: On Tue, 2020-04-28 at 21:13 +0800, Wu Bo wrote: if the ceph_mdsc_open_export_target_session() return fails, should add a lock to avoid twice unlocking. Because the lock will be released at the retry or out_unlock tag. The problem looks real, but... --

Re: [PATCH V2] fs/ceph:fix double unlock in handle_cap_export()

2020-04-28 Thread Jeff Layton
On Tue, 2020-04-28 at 21:13 +0800, Wu Bo wrote: > if the ceph_mdsc_open_export_target_session() return fails, > should add a lock to avoid twice unlocking. > Because the lock will be released at the retry or out_unlock tag. > The problem looks real, but... > -- > v1 -> v2: > add

[PATCH V2] fs/ceph:fix double unlock in handle_cap_export()

2020-04-28 Thread Wu Bo
if the ceph_mdsc_open_export_target_session() return fails, should add a lock to avoid twice unlocking. Because the lock will be released at the retry or out_unlock tag. -- v1 -> v2: add spin_lock(>i_ceph_lock) before goto out_unlock tag. Signed-off-by: Wu Bo --- fs/ceph/caps.c | 27