From: Alex Zhuravlev Date: Mon, 7 Dec 2015 13:35:40 +0000 (+0300) Subject: LU-7525 mdd: mdd_migrate_create() should not set nlink X-Git-Tag: 2.7.66~49 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=41e5427cae5636dc3951ca9104d0a82f67b7f230;p=fs%2Flustre-release.git LU-7525 mdd: mdd_migrate_create() should not set nlink at object creation. the migration process itself takes care of nlink incrementing it atomically with dt_insert(). Change-Id: Ia2c8f6cdd77e0808a8060d6e1c542c596612a3ce Signed-off-by: Alex Zhuravlev Reviewed-on: http://review.whamcloud.com/17496 Reviewed-by: Andreas Dilger Tested-by: Jenkins Reviewed-by: wangdi Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/lustre/mdd/mdd_dir.c b/lustre/mdd/mdd_dir.c index 864ff8a..4d7d117 100644 --- a/lustre/mdd/mdd_dir.c +++ b/lustre/mdd/mdd_dir.c @@ -3547,6 +3547,9 @@ static int mdd_migrate_create(const struct lu_env *env, if (rc != 0) GOTO(stop_trans, rc); + /* don't set nlink from the original object */ + la->la_valid &= ~LA_NLINK; + /* create the target object */ rc = mdd_object_create(env, mdd_pobj, mdd_tobj, la, spec, NULL, NULL, hint, handle);