From: green Date: Mon, 15 Mar 2004 20:55:58 +0000 (+0000) Subject: b=2926 X-Git-Tag: v1_7_100~2465 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=b5336a6505cbd5abe75f0c26fe2ca0556370b1c0 b=2926 r=phik Make mds_reint_create to use mds_lock_new_child everywhere instead of taking the lock (and incorrect one) on its own. --- diff --git a/lustre/mds/mds_reint.c b/lustre/mds/mds_reint.c index 40c49f3..9e5f972 100644 --- a/lustre/mds/mds_reint.c +++ b/lustre/mds/mds_reint.c @@ -655,9 +655,6 @@ static int mds_reint_create(struct mds_update_record *rec, int offset, inode->i_ino, inode->i_generation); } else { struct lustre_handle child_ino_lockh; - struct ldlm_res_id child_res_id = - { .name = { inode->i_ino, 0 } }; - int lock_flags = 0; CDEBUG(D_INODE, "created ino %lu with gen %x\n", inode->i_ino, inode->i_generation); @@ -668,12 +665,7 @@ static int mds_reint_create(struct mds_update_record *rec, int offset, * in unlink, to avoid replay problems if this reply * makes it out to the client but the unlink's does not. * See bug 2029 for more detail.*/ - rc = ldlm_cli_enqueue(NULL, NULL, obd->obd_namespace, - child_res_id, LDLM_PLAIN, NULL, - LCK_EX, &lock_flags, - mds_blocking_ast, - ldlm_completion_ast, NULL, NULL, - NULL, 0, NULL, &child_ino_lockh); + rc = mds_lock_new_child(obd, inode, &child_ino_lockh); if (rc != ELDLM_OK) { CERROR("error locking for unlink/create sync: " "%d\n", rc);