From: Oleg Drokin Date: Wed, 10 Feb 2016 18:00:18 +0000 (-0500) Subject: staging/lustre/obdecho: Remove always true condition X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=61ece0e60d5db836dcec2707c3c89bc83ac2046d;p=openwrt%2Fstaging%2Fblogic.git staging/lustre/obdecho: Remove always true condition Dan Carpenter noticed that since we already checked for (oa->o_valid & OBD_MD_FLID) == 0, that means (oa->o_valid & OBD_MD_FLID) is always true after that so no point in checking for it. Signed-off-by: Oleg Drokin Reported-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/lustre/lustre/obdecho/echo_client.c b/drivers/staging/lustre/lustre/obdecho/echo_client.c index d3e398f70434..e1c9d118e037 100644 --- a/drivers/staging/lustre/lustre/obdecho/echo_client.c +++ b/drivers/staging/lustre/lustre/obdecho/echo_client.c @@ -1222,10 +1222,8 @@ static int echo_create_object(const struct lu_env *env, struct echo_device *ed, } /* setup object ID here */ - if (oa->o_valid & OBD_MD_FLID) { - LASSERT(oa->o_valid & OBD_MD_FLGROUP); - lsm->lsm_oi = oa->o_oi; - } + LASSERT(oa->o_valid & OBD_MD_FLGROUP); + lsm->lsm_oi = oa->o_oi; if (ostid_id(&lsm->lsm_oi) == 0) ostid_set_id(&lsm->lsm_oi, ++last_object_id);