dev->fd = create_cow_file(dev->file, dev->cow.file, 
dev->fd = create_cow_file(dev->file, dev->cow.file, 
static int ubd_open_dev(struct ubd *dev){	struct openflags flags;	char **back_ptr;	int err, create_cow, *create_ptr;	dev->openflags = dev->boot_openflags;	create_cow = 0;	create_ptr = (dev->cow.file != NULL) ? &create_cow : NULL;	back_ptr = dev->no_cow ? NULL : &dev->cow.file;	dev->fd = open_ubd_file(dev->file, &dev->openflags, back_ptr,				&dev->cow.bitmap_offset, &dev->cow.bitmap_len, 				&dev->cow.data_offset, create_ptr);	if((dev->fd == -ENOENT) && create_cow){		dev->fd = create_cow_file(dev->file, dev->cow.file,					  dev->openflags, 1 << 9, PAGE_SIZE,					  &dev->cow.bitmap_offset, 					  &dev->cow.bitmap_len,					  &dev->cow.data_offset);		if(dev->fd >= 0){			printk(KERN_INFO "Creating \"%s\" as COW file for "			       "\"%s\"\n", dev->file, dev->cow.file);		}	}	if(dev->fd < 0){		printk("Failed to open '%s', errno = %d\n", dev->file,		       -dev->fd);		return(dev->fd);	}	if(dev->cow.file != NULL){		err = -ENOMEM;		dev->cow.bitmap = (void *) vmalloc(dev->cow.bitmap_len);		if(dev->cow.bitmap == NULL){			printk(KERN_ERR "Failed to vmalloc COW bitmap\n");			goto error;		}		flush_tlb_kernel_vm();		err = read_cow_bitmap(dev->fd, dev->cow.bitmap, 				      dev->cow.bitmap_offset, 				      dev->cow.bitmap_len);		if(err < 0)			goto error;		flags = dev->openflags;		flags.w = 0;		err = open_ubd_file(dev->cow.file, &flags, NULL, NULL, NULL, 				    NULL, NULL);		if(err < 0) goto error;		dev->cow.fd = err;	}	return(0); error:	os_close_file(dev->fd);	return(err);}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/91acb21f084aa244f26839406ae7ed8aa3668058/ubd_kern.c/buggy/arch/um/drivers/ubd_kern.c