From: vs Date: Thu, 23 Jul 2009 23:29:52 +0000 (+0000) Subject: b=19623 X-Git-Tag: v1_9_230~47 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=441b314b8e4a40a4aaa785eb8bd82644df50b5d2 b=19623 i=alex.zhuravlev, alexander.zarochentsev get rid of an extra iput on mkdir error handling code path --- diff --git a/lustre/mdd/mdd_dir.c b/lustre/mdd/mdd_dir.c index ea7c88b..3d5a7f9 100644 --- a/lustre/mdd/mdd_dir.c +++ b/lustre/mdd/mdd_dir.c @@ -1464,20 +1464,12 @@ int mdd_object_initialize(const struct lu_env *env, const struct lu_fid *pfid, __mdd_ref_add(env, child, handle); rc = __mdd_index_insert_only(env, child, mdo2fid(child), dot, handle, BYPASS_CAPA); - if (rc == 0) { + if (rc == 0) rc = __mdd_index_insert_only(env, child, pfid, dotdot, handle, BYPASS_CAPA); - if (rc != 0) { - int rc2; - - rc2 = __mdd_index_delete(env, child, dot, 1, - handle, BYPASS_CAPA); - if (rc2 != 0) - CERROR("Failure to cleanup after dotdot" - " creation: %d (%d)\n", rc2, rc); - } - } + if (rc != 0) + __mdd_ref_del(env, child, handle, 1); } if (rc == 0) mdd_links_add(env, child, pfid, lname, handle);