Whamcloud - gitweb
LU-10391 ptlrpc: lprocfs_exp_setup() to take struct lnet_nid
[fs/lustre-release.git] / lustre / mdt / mdt_fs.c
index 262cabe..ac9d7c6 100644 (file)
@@ -63,12 +63,18 @@ static const struct proc_ops mdt_open_files_seq_fops = {
 int mdt_export_stats_init(struct obd_device *obd, struct obd_export *exp,
                          void *localdata)
 {
-       lnet_nid_t *client_nid = localdata;
+       lnet_nid_t *client_nid4 = localdata;
        struct nid_stat *stats;
        int rc;
        ENTRY;
 
-       rc = lprocfs_exp_setup(exp, client_nid);
+       if (client_nid4) {
+               struct lnet_nid client_nid;
+
+               lnet_nid4_to_nid(*client_nid4, &client_nid);
+               rc = lprocfs_exp_setup(exp, &client_nid);
+       } else
+               rc = lprocfs_exp_setup(exp, NULL);
        if (rc != 0)
                /* Mask error for already created /proc entries */
                RETURN(rc == -EALREADY ? 0 : rc);