diff --git a/lustre/obdclass/lprocfs_status.c b/lustre/obdclass/lprocfs_status.c index 8f6833bd2750bfa8725281f5953875e55a0f6b7b..30927e881f84e98b8853bab4eafdc143b6866e30 100644 --- a/lustre/obdclass/lprocfs_status.c +++ b/lustre/obdclass/lprocfs_status.c @@ -1325,8 +1325,10 @@ int lprocfs_exp_setup(struct obd_export *exp, lnet_nid_t nid, int *newnid) if (rc) CWARN("Error adding the uuid file\n"); - /* this used only for destroy and because not need locking */ + /* protect competitive add to list, not need locking on destroy */ + spin_lock(&obd->nid_lock); list_add(&tmp->nid_list, &obd->obd_nid_stats); + spin_unlock(&obd->nid_lock); exp->exp_nid_stats = tmp; *newnid = 1;