From: Andriy Skulysh Date: Thu, 6 Feb 2014 22:50:08 +0000 (+0200) Subject: LU-4596 lprocfs: mdt/*/exports/*/uuid is empty after remount X-Git-Tag: 2.5.58~72 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=refs%2Fchanges%2F71%2F9171%2F4;p=fs%2Flustre-release.git LU-4596 lprocfs: mdt/*/exports/*/uuid is empty after remount need to assign exp_nid_stats even if old stats are present Change-Id: I9b0ac4c7ccee6cbd457827b20123bf40d91aaf33 Xyratex-bug-id: MRP-1641 Signed-off-by: Andriy Skulysh Reviewed-on: http://review.whamcloud.com/9171 Reviewed-by: Lai Siyao Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Emoly Liu Reviewed-by: Oleg Drokin --- diff --git a/lustre/obdclass/lprocfs_status.c b/lustre/obdclass/lprocfs_status.c index 29604ff..9956ada 100644 --- a/lustre/obdclass/lprocfs_status.c +++ b/lustre/obdclass/lprocfs_status.c @@ -2848,7 +2848,13 @@ int lprocfs_exp_setup(struct obd_export *exp, lnet_nid_t *nid, int *newnid) /* Return -EALREADY here so that we know that the /proc * entry already has been created */ if (old_stat != new_stat) { - nidstat_putref(old_stat); + spin_lock(&exp->exp_lock); + if (exp->exp_nid_stats) { + LASSERT(exp->exp_nid_stats == old_stat); + nidstat_putref(exp->exp_nid_stats); + } + exp->exp_nid_stats = old_stat; + spin_unlock(&exp->exp_lock); GOTO(destroy_new, rc = -EALREADY); } /* not found - create */