Whamcloud - gitweb
LU-11821 lfsck: do not compare negatives to sizeof() 08/33908/7
authorAlex Zhuravlev <bzzz@whamcloud.com>
Fri, 21 Dec 2018 12:03:07 +0000 (15:03 +0300)
committerOleg Drokin <green@whamcloud.com>
Thu, 21 Mar 2019 03:43:22 +0000 (03:43 +0000)
as sizeof() is unsigned.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ib8cf8026a4e18ac9704a0294eaf7c57ecf678e03
Reviewed-on: https://review.whamcloud.com/33908
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
lustre/lfsck/lfsck_layout.c

index 6cdbd83..1a21536 100644 (file)
@@ -1106,7 +1106,7 @@ static int fid_is_for_ostobj(const struct lu_env *env,
        loa = &lfsck_env_info(env)->lti_loa;
        rc = dt_xattr_get(env, obj, lfsck_buf_get(env, loa, sizeof(*loa)),
                          XATTR_NAME_LMA);
-       if (rc >= sizeof(struct lustre_mdt_attrs)) {
+       if (rc >= (int)sizeof(struct lustre_mdt_attrs)) {
                lustre_lma_swab(&loa->loa_lma);
 
                return loa->loa_lma.lma_compat & LMAC_FID_ON_OST ? 1 : 0;