Whamcloud - gitweb
LU-10067 mdt: reinit lock when fail to try lock 97/29597/4
authorHongchao Zhang <hongchao.zhang@intel.com>
Wed, 11 Oct 2017 05:05:28 +0000 (13:05 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 9 Nov 2017 20:07:03 +0000 (20:07 +0000)
In mdt_lock_objects_in_linkea, the mdt_lock_handle should be
re-initialized when the first try (mdt_object_lock_try) failed.

Change-Id: I8232c40c3e9e239391b7a43d9d16f5563bd794e5
Signed-off-by: Hongchao Zhang <hongchao.zhang@intel.com>
Reviewed-on: https://review.whamcloud.com/29597
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/mdt/mdt_reint.c

index a252b5f..f72289e 100644 (file)
@@ -1452,6 +1452,7 @@ again:
                                GOTO(out, rc = -EBUSY);
                        }
 
+                       mdt_lock_pdo_init(&mll->mll_lh, LCK_PW, &name);
                        rc = mdt_object_lock(info, mdt_pobj, &mll->mll_lh,
                                             MDS_INODELOCK_UPDATE);
                        if (rc != 0) {