Whamcloud - gitweb
LU-1866 misc: fix some issues found during LFSCK
[fs/lustre-release.git] / lustre / mdd / mdd_dir.c
index 0e893c9..5f210b8 100644 (file)
@@ -1480,7 +1480,6 @@ static int mdd_create_sanity_check(const struct lu_env *env,
         struct lu_fid     *fid       = &info->mti_fid;
         struct mdd_object *obj       = md2mdd_obj(pobj);
         struct mdd_device *m         = mdo2mdd(pobj);
-        int lookup                   = spec->sp_cr_lookup;
         int rc;
         ENTRY;
 
@@ -1493,7 +1492,7 @@ static int mdd_create_sanity_check(const struct lu_env *env,
          * exists or not because MDT performs lookup for it.
          * name length check is done in lookup.
          */
-        if (lookup) {
+       if (spec->sp_cr_lookup) {
                 /*
                  * Check if the name already exist, though it will be checked in
                  * _index_insert also, for avoiding rolling back if exists