From: Fan Yong Date: Sat, 6 Sep 2014 20:13:49 +0000 (+0800) Subject: LU-5892 lfsck: remove improper LASSERT in lfsck_needs_scan_dir X-Git-Tag: 2.6.91~53 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=4db8abadae3f8a393fe0d25e07575305ae3876da LU-5892 lfsck: remove improper LASSERT in lfsck_needs_scan_dir Inside the lfsck_needs_scan_dir(), when the internal variable @fid becomes the input @obj's parent FID, the internal variable @depth may be still zero, so the original "LASSERT(depth > 0);" is improper under such case. Then remove it. Signed-off-by: Fan Yong Change-Id: I64f10be682c51c6ac5cc1af3497eb569281fcd21 Reviewed-on: http://review.whamcloud.com/12670 Reviewed-by: Alex Zhuravlev Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Lai Siyao Reviewed-by: Oleg Drokin --- diff --git a/lustre/lfsck/lfsck_engine.c b/lustre/lfsck/lfsck_engine.c index cda9180e..196eb43 100644 --- a/lustre/lfsck/lfsck_engine.c +++ b/lustre/lfsck/lfsck_engine.c @@ -221,7 +221,7 @@ static int lfsck_needs_scan_dir(const struct lu_env *env, fld_range_set_mdt(range); rc = fld_local_lookup(env, ss->ss_server_fld, fid_seq(fid), range); - if (rc != 0 || range->lsr_index != idx) { + if (rc != 0 || range->lsr_index != idx) /* Current FID should NOT be for the input parameter * @obj, because the lfsck_master_oit_engine() has * filtered out agent object. So current FID is for @@ -229,10 +229,7 @@ static int lfsck_needs_scan_dir(const struct lu_env *env, * So the ancestor is a remote directory. The input * parameter @obj is local directory, and should be * scanned under such case. */ - LASSERT(depth > 0); - return 1; - } /* normal FID on this target (locally) must be for the * client-side visiable object. */