#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;
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);
/* 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 */