From 5d89450b462f76fe2a377e7253595a162dae309b Mon Sep 17 00:00:00 2001 From: Andreas Dilger Date: Sat, 13 Oct 2018 17:08:28 -0600 Subject: [PATCH] LU-11516 mdd: do not assert on missing orphan Do not assert if an orphan being cleaned up is missing. Signed-off-by: Andreas Dilger Change-Id: Icf990bf5ea6dfa2098f0b1fa90d9f546d83ebbe5 Reviewed-on: https://review.whamcloud.com/33368 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Lai Siyao Reviewed-by: Hongchao Zhang Reviewed-by: Oleg Drokin --- lustre/mdd/mdd_orphans.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lustre/mdd/mdd_orphans.c b/lustre/mdd/mdd_orphans.c index 9930b78..7b99a93 100644 --- a/lustre/mdd/mdd_orphans.c +++ b/lustre/mdd/mdd_orphans.c @@ -214,6 +214,9 @@ int mdd_orphan_declare_delete(const struct lu_env *env, struct mdd_object *obj, if (rc) return rc; + if (!lu_object_exists(&obj->mod_obj.mo_lu)) + return -ENOENT; + if (S_ISDIR(mdd_object_type(obj))) { rc = mdo_declare_ref_del(env, obj, th); if (rc) -- 1.8.3.1