X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Flod%2Flod_lov.c;h=394264b6a52cb4ca5d6f3c7d871f9d370441318d;hp=1a8f09a4a222d723046bd4bcafa639288f0aa7b1;hb=21d716e6c16424d9deb646456758ebbaa9c70fec;hpb=58e218b8a9b78fdbd4332ea2fa8c99fc10c2c673 diff --git a/lustre/lod/lod_lov.c b/lustre/lod/lod_lov.c index 1a8f09a..394264b 100644 --- a/lustre/lod/lod_lov.c +++ b/lustre/lod/lod_lov.c @@ -676,8 +676,8 @@ int lod_store_def_striping(const struct lu_env *env, struct dt_object *dt, v3->lmm_stripe_count = cpu_to_le16(lo->ldo_def_stripenr); v3->lmm_stripe_offset = cpu_to_le16(lo->ldo_def_stripe_offset); v3->lmm_stripe_size = cpu_to_le32(lo->ldo_def_stripe_size); - if (lo->ldo_pool) - strncpy(v3->lmm_pool_name, lo->ldo_pool, + if (lo->ldo_pool != NULL) + strlcpy(v3->lmm_pool_name, lo->ldo_pool, sizeof(v3->lmm_pool_name)); info->lti_buf.lb_buf = v3; info->lti_buf.lb_len = sizeof(*v3);