From 0117cbc7b085404af72978b0361b33966ac379cb Mon Sep 17 00:00:00 2001 From: Niu Yawei Date: Thu, 2 Feb 2012 23:44:24 -0800 Subject: [PATCH] LU-1055 remove improper assert in osd_declare_object_destroy After recovery, orphan cleanup could race with the client unlink on close, so the LASSERT on lu_object_is_dying() should be moved from declare stage into the real destroy function. Signed-off-by: Alex Zhuravlev Signed-off-by: Niu Yawei Change-Id: Ibc4ad0613d907ab98b653d5a64ce54e1f018dcb2 Reviewed-on: http://review.whamcloud.com/2083 Tested-by: Hudson Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/osd-ldiskfs/osd_handler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lustre/osd-ldiskfs/osd_handler.c b/lustre/osd-ldiskfs/osd_handler.c index 1098ae4..aedf8dd 100644 --- a/lustre/osd-ldiskfs/osd_handler.c +++ b/lustre/osd-ldiskfs/osd_handler.c @@ -1996,7 +1996,6 @@ static int osd_declare_object_destroy(const struct lu_env *env, oh = container_of0(th, struct osd_thandle, ot_super); LASSERT(oh->ot_handle == NULL); LASSERT(inode); - LASSERT(!lu_object_is_dying(dt->do_lu.lo_header)); OSD_DECLARE_OP(oh, destroy); OSD_DECLARE_OP(oh, delete); @@ -2024,6 +2023,7 @@ static int osd_object_destroy(const struct lu_env *env, oh = container_of0(th, struct osd_thandle, ot_super); LASSERT(oh->ot_handle); LASSERT(inode); + LASSERT(!lu_object_is_dying(dt->do_lu.lo_header)); if (S_ISDIR(inode->i_mode)) { LASSERT(osd_inode_unlinked(inode) || -- 1.8.3.1