spin_lock_bh(&appldata_ops_lock); 
spin_lock(&appldata_ops_lock); 
int appldata_register_ops(struct appldata_ops *ops){	struct list_head *lh;	struct appldata_ops *tmp_ops;	int i;	i = 0;	if ((ops->size > APPLDATA_MAX_REC_SIZE) ||		(ops->size < 0)){		P_ERROR("Invalid size of %s record = %i, maximum = %i!\n",			ops->name, ops->size, APPLDATA_MAX_REC_SIZE);		return -ENOMEM;	}	if ((ops->ctl_nr == CTL_APPLDATA) ||	    (ops->ctl_nr == CTL_APPLDATA_TIMER) ||	    (ops->ctl_nr == CTL_APPLDATA_INTERVAL)) {		P_ERROR("ctl_nr %i already in use!\n", ops->ctl_nr);		return -EBUSY;	}	ops->ctl_table = kmalloc(4*sizeof(struct ctl_table), GFP_KERNEL);	if (ops->ctl_table == NULL) {		P_ERROR("Not enough memory for %s ctl_table!\n", ops->name);		return -ENOMEM;	}	memset(ops->ctl_table, 0, 4*sizeof(struct ctl_table));	spin_lock_bh(&appldata_ops_lock);	list_for_each(lh, &appldata_ops_list) {		tmp_ops = list_entry(lh, struct appldata_ops, list);		P_DEBUG("register_ops loop: %i) name = %s, ctl = %i\n",			++i, tmp_ops->name, tmp_ops->ctl_nr);		P_DEBUG("Comparing %s (ctl %i) with %s (ctl %i)\n",			tmp_ops->name, tmp_ops->ctl_nr, ops->name,			ops->ctl_nr);		if (strncmp(tmp_ops->name, ops->name,				APPLDATA_PROC_NAME_LENGTH) == 0) {			P_ERROR("Name \"%s\" already registered!\n", ops->name);			kfree(ops->ctl_table);			spin_unlock_bh(&appldata_ops_lock);			return -EBUSY;		}		if (tmp_ops->ctl_nr == ops->ctl_nr) {			P_ERROR("ctl_nr %i already registered!\n", ops->ctl_nr);			kfree(ops->ctl_table);			spin_unlock_bh(&appldata_ops_lock);			return -EBUSY;		}	}	list_add(&ops->list, &appldata_ops_list);	spin_unlock_bh(&appldata_ops_lock);	ops->ctl_table[0].ctl_name = CTL_APPLDATA;	ops->ctl_table[0].procname = appldata_proc_name;	ops->ctl_table[0].maxlen   = 0;	ops->ctl_table[0].mode     = S_IRUGO | S_IXUGO;	ops->ctl_table[0].child    = &ops->ctl_table[2];	ops->ctl_table[1].ctl_name = 0;	ops->ctl_table[2].ctl_name = ops->ctl_nr;	ops->ctl_table[2].procname = ops->name;	ops->ctl_table[2].mode     = S_IRUGO | S_IWUSR;	ops->ctl_table[2].proc_handler = appldata_generic_handler;	ops->ctl_table[2].data = ops;	ops->ctl_table[3].ctl_name = 0;	ops->sysctl_header = register_sysctl_table(ops->ctl_table,1);	P_INFO("%s-ops registered!\n", ops->name);	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/f26d583e41aedad8159acf9533fa287d7209dfbf/appldata_base.c/clean/arch/s390/appldata/appldata_base.c