From ee89e235158848f5bc44c12c51f8c85c7d0c4336 Mon Sep 17 00:00:00 2001 From: Alex Zhuravlev Date: Fri, 8 Feb 2013 23:41:59 +0400 Subject: [PATCH] LU-2785 mdd: do not use mti_fid in mdd_find_or_create_root() as in the subsequent callchain it can be used by mdd_create_sanity_check() Signed-off-by: Alex Zhuravlev Change-Id: Ia357f587192c54e3c406a35054dca47580077056 Reviewed-on: http://review.whamcloud.com/5311 Reviewed-by: wangdi Reviewed-by: Andreas Dilger Tested-by: Hudson Tested-by: Maloo Reviewed-by: Mike Pershin --- lustre/mdd/mdd_device.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lustre/mdd/mdd_device.c b/lustre/mdd/mdd_device.c index e9d57c5..007b999 100644 --- a/lustre/mdd/mdd_device.c +++ b/lustre/mdd/mdd_device.c @@ -1166,23 +1166,23 @@ static int mdd_find_or_create_root(const struct lu_env *env, { struct dt_object *root; struct md_object *mroot; - struct lu_fid *fid = &mdd_env_info(env)->mti_fid; + struct lu_fid fid; int rc = 0; ENTRY; /* Check if the "ROOT" entry exists already */ root = dt_store_open(env, mdd->mdd_child, "", mdd_root_dir_name, - fid); + &fid); if (!IS_ERR(root)) { lu_object_put(env, &root->do_lu); GOTO(out, rc = 0); } - lu_root_fid(fid); + lu_root_fid(&fid); /* New Filesystem, create /ROOT */ mroot = llo_store_create_index(env, &mdd->mdd_md_dev, mdd->mdd_bottom, - "", mdd_root_dir_name, fid, + "", mdd_root_dir_name, &fid, &dt_directory_features); if (IS_ERR(mroot)) GOTO(out, rc = PTR_ERR(mroot)); @@ -1190,7 +1190,7 @@ static int mdd_find_or_create_root(const struct lu_env *env, lu_object_put(env, &mroot->mo_lu); out: if (rc == 0) - mdd->mdd_root_fid = *fid; + mdd->mdd_root_fid = fid; RETURN(rc); } @@ -1202,7 +1202,7 @@ static int mdd_prepare(const struct lu_env *env, struct mdd_device *mdd = lu2mdd_dev(cdev); struct lu_device *next = &mdd->mdd_child->dd_lu_dev; struct dt_object *root; - struct lu_fid *fid = &mdd_env_info(env)->mti_fid; + struct lu_fid fid; int rc; ENTRY; @@ -1237,7 +1237,7 @@ static int mdd_prepare(const struct lu_env *env, /* we use capa file to declare llog changes, * will be fixed with new llog in 2.3 */ - root = dt_store_open(env, mdd->mdd_child, "", CAPA_KEYS, fid); + root = dt_store_open(env, mdd->mdd_child, "", CAPA_KEYS, &fid); if (IS_ERR(root)) GOTO(out, rc = PTR_ERR(root)); -- 1.8.3.1