From: bobijam Date: Wed, 5 Mar 2008 07:24:49 +0000 (+0000) Subject: Branch b1_6 X-Git-Tag: v1_8_0_110~719 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=fba0b84f2ec603ee1eb9aeacc59f4ab60daa7323;p=fs%2Flustre-release.git Branch b1_6 b=14873 i=johann i=shadow protect competitive adding to obd->obd_nid_stats. --- diff --git a/lustre/obdclass/lprocfs_status.c b/lustre/obdclass/lprocfs_status.c index 8f6833b..30927e8 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;