if((filp->f_mode & FMODE_WRITE) && !dev->openflags.w){ 
set_disk_ro(disk, !dev->openflags.w);  /* This should no more be needed. And it didn't work anyway to exclude * read-write remounting of filesystems.*/ /*if((filp->f_mode & FMODE_WRITE) && !dev->openflags.w){ 
static int ubd_open(struct inode *inode, struct file *filp){	struct gendisk *disk = inode->i_bdev->bd_disk;	struct ubd *dev = disk->private_data;	int err = 0;	if(dev->count == 0){		err = ubd_open_dev(dev);		if(err){			printk(KERN_ERR "%s: Can't open \"%s\": errno = %d\n",			       disk->disk_name, dev->file, -err);			goto out;		}	}	dev->count++;	if((filp->f_mode & FMODE_WRITE) && !dev->openflags.w){	        if(--dev->count == 0) ubd_close(dev);	        err = -EROFS;	} out:	return(err);}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/2c49be99ede1e3685a9817a564b4b1678d48e1b9/ubd_kern.c/clean/arch/um/drivers/ubd_kern.c