Whamcloud - gitweb
LU-3227 tests: fix for acl test
[fs/lustre-release.git] / lustre / obdclass / lprocfs_status.c
index 973fd0b..938cb7a 100644 (file)
@@ -307,7 +307,7 @@ int lprocfs_evict_client_release(struct inode *inode, struct file *f)
 #define BUFLEN (UUID_MAX + 5)
 
 #ifndef HAVE_ONLY_PROCFS_SEQ
-int lprocfs_wr_evict_client(struct file *file, const char *buffer,
+int lprocfs_wr_evict_client(struct file *file, const char __user *buffer,
                            unsigned long count, void *data)
 {
        struct obd_device *obd = data;
@@ -1936,7 +1936,6 @@ lprocfs_seq_obd_setup(struct obd_device *obd)
        int rc = 0;
 
        LASSERT(obd != NULL);
-       LASSERT(obd->obd_vars != NULL);
        LASSERT(obd->obd_magic == OBD_DEVICE_MAGIC);
        LASSERT(obd->obd_type->typ_procroot != NULL);
 
@@ -2349,8 +2348,6 @@ void lprocfs_init_ops_stats(int num_private_stats, struct lprocfs_stats *stats)
         LPROCFS_OBD_OP_INIT(num_private_stats, stats, statfs_async);
         LPROCFS_OBD_OP_INIT(num_private_stats, stats, packmd);
         LPROCFS_OBD_OP_INIT(num_private_stats, stats, unpackmd);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, preallocate);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, precreate);
         LPROCFS_OBD_OP_INIT(num_private_stats, stats, create);
         LPROCFS_OBD_OP_INIT(num_private_stats, stats, create_async);
         LPROCFS_OBD_OP_INIT(num_private_stats, stats, destroy);
@@ -2358,24 +2355,12 @@ void lprocfs_init_ops_stats(int num_private_stats, struct lprocfs_stats *stats)
         LPROCFS_OBD_OP_INIT(num_private_stats, stats, setattr_async);
         LPROCFS_OBD_OP_INIT(num_private_stats, stats, getattr);
         LPROCFS_OBD_OP_INIT(num_private_stats, stats, getattr_async);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, brw);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, merge_lvb);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, adjust_kms);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, punch);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, sync);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, migrate);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, copy);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, iterate);
         LPROCFS_OBD_OP_INIT(num_private_stats, stats, preprw);
         LPROCFS_OBD_OP_INIT(num_private_stats, stats, commitrw);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, enqueue);
         LPROCFS_OBD_OP_INIT(num_private_stats, stats, change_cbdata);
         LPROCFS_OBD_OP_INIT(num_private_stats, stats, find_cbdata);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, cancel);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, cancel_unused);
         LPROCFS_OBD_OP_INIT(num_private_stats, stats, init_export);
         LPROCFS_OBD_OP_INIT(num_private_stats, stats, destroy_export);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, extent_calc);
         LPROCFS_OBD_OP_INIT(num_private_stats, stats, llog_init);
         LPROCFS_OBD_OP_INIT(num_private_stats, stats, llog_connect);
         LPROCFS_OBD_OP_INIT(num_private_stats, stats, llog_finish);
@@ -2862,7 +2847,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 */
@@ -3337,7 +3328,7 @@ int lprocfs_recovery_status_seq_show(struct seq_file *m, void *data)
 
        LASSERT(obd != NULL);
 
-       seq_printf(m, "status: \n");
+       seq_printf(m, "status: ");
        if (obd->obd_max_recoverable_clients == 0) {
                seq_printf(m, "INACTIVE\n");
                goto out;