diff --git a/lustre/lov/lov_pack.c b/lustre/lov/lov_pack.c
index ee1ef8231123814e71caa577a6facb14dc44e943..36127eb2d00a7db9a6f84fc6b9554493a4e07068 100644
--- a/lustre/lov/lov_pack.c
+++ b/lustre/lov/lov_pack.c
@@ -137,7 +137,7 @@ int lov_packmd(struct obd_export *exp, struct lov_mds_md **lmmp,
                  * Anyway, this is pretty inaccurate since ld_tgt_count now
                  * represents max index and we should rely on the actual number
                  * of OSTs instead */
-                stripe_count = min(LOV_MAX_STRIPE_COUNT,
+                stripe_count = min((__u32)LOV_MAX_STRIPE_COUNT,
                                    lov->desc.ld_tgt_count);
         }