X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Ffid%2Ffid_store.c;h=9585732e17aad27f4f9d549729544f34cd136feb;hp=8e860917c1fbdad784a3534bd9b537ecc72aa61c;hb=21d716e6c16424d9deb646456758ebbaa9c70fec;hpb=58e218b8a9b78fdbd4332ea2fa8c99fc10c2c673 diff --git a/lustre/fid/fid_store.c b/lustre/fid/fid_store.c index 8e86091..9585732 100644 --- a/lustre/fid/fid_store.c +++ b/lustre/fid/fid_store.c @@ -95,8 +95,7 @@ int seq_update_cb_add(struct thandle *th, struct lu_server_seq *seq) dcb = &ccb->suc_cb; dcb->dcb_func = seq_update_cb; CFS_INIT_LIST_HEAD(&dcb->dcb_linkage); - strncpy(dcb->dcb_name, "seq_update_cb", MAX_COMMIT_CB_STR_LEN); - dcb->dcb_name[MAX_COMMIT_CB_STR_LEN - 1] = '\0'; + strlcpy(dcb->dcb_name, "seq_update_cb", sizeof(dcb->dcb_name)); rc = dt_trans_cb_add(th, dcb); if (rc)