Whamcloud - gitweb
LU-17602 mdd: use correct fid in mdd_rename 60/54260/4
authorAlex Zhuravlev <bzzz@whamcloud.com>
Mon, 4 Mar 2024 04:32:04 +0000 (07:32 +0300)
committerAndreas Dilger <adilger@whamcloud.com>
Sun, 10 Mar 2024 21:54:25 +0000 (21:54 +0000)
mdd_rename() can re-insert target name back as a part of error
handling. use correct fid for that, not own target directory fid.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I0662fa005459416b070157a2d049fcf5ed08ae91

lustre/mdd/mdd_dir.c

index 5245db8..eafab35 100644 (file)
@@ -3501,7 +3501,8 @@ fixup_tpobj:
                                        mdo_ref_add(env, mdd_tobj, handle);
                        }
 
-                       rc2 = __mdd_index_insert(env, mdd_tpobj, tpobj_fid,
+                       rc2 = __mdd_index_insert(env, mdd_tpobj,
+                                                mdd_object_fid(mdd_tobj),
                                                 mdd_object_type(mdd_tobj),
                                                 tname, handle);
                        if (rc2)