Whamcloud - gitweb
LU-15868 lfsck: don't crash upon dir migration failure
[fs/lustre-release.git] / lustre / lfsck / lfsck_lib.c
index 4302f4b..fdfab4a 100644 (file)
@@ -1499,11 +1499,8 @@ int lfsck_verify_lpf(const struct lu_env *env, struct lfsck_instance *lfsck)
                goto find_child1;
        }
 
-       if (unlikely(!dt_try_as_dir(env, child2))) {
-               lfsck_object_put(env, child2);
-               child2 = NULL;
-               rc = -ENOTDIR;
-       }
+       if (unlikely(!dt_try_as_dir(env, child2)))
+               GOTO(put, rc = -ENOTDIR);
 
 find_child1:
        if (fid_is_zero(&bk->lb_lpf_fid))