From 168894d4237977ef49067f2fc19bf4412ae5d51f Mon Sep 17 00:00:00 2001 From: zhaoyifeng Date: Thu, 14 Jul 2011 11:30:17 +0800 Subject: [PATCH] support make_ext4fs --- fs/block_dev.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/block_dev.c b/fs/block_dev.c index 267c5005e948..208570742682 100755 --- a/fs/block_dev.c +++ b/fs/block_dev.c @@ -1480,7 +1480,7 @@ static const struct address_space_operations def_blk_aops = { ssize_t mydo_sync_read(struct file *filp, char __user *buf, size_t len, loff_t *ppos) { unsigned long buf_addr = (unsigned long)buf; - if(memcmp(filp->f_mapping->host->i_bdev->bd_disk->disk_name, "mtdblock", 8) == 0 )// kernel mem is usb tran &&(buf_addr >= 0xc0000000) + if((memcmp(filp->f_mapping->host->i_bdev->bd_disk->disk_name, "mtdblock", 8) == 0) &&(buf_addr >= 0xc0000000))// kernel mem is usb tran &&(buf_addr >= 0xc0000000) { struct mtd_blktrans_dev *dev; struct mtd_blktrans_ops *tr; @@ -1488,10 +1488,10 @@ ssize_t mydo_sync_read(struct file *filp, char __user *buf, size_t len, loff_t * dev = (filp->f_mapping->host->i_bdev->bd_disk->private_data); mtd = dev->mtd; - if((buf_addr < 0xc0000000)&&(mtd->name[0]=='u' &&mtd->name[3]=='r' && mtd->name[4]==0)) // user part + /*if((buf_addr < 0xc0000000)&&(mtd->name[0]=='u' &&mtd->name[3]=='r' && mtd->name[4]==0)) // user part { return(do_sync_read(filp, buf,len,ppos)); - } + }*/ tr = dev->tr; if (!tr->readsect) { @@ -1515,7 +1515,7 @@ ssize_t mydo_sync_read(struct file *filp, char __user *buf, size_t len, loff_t * ssize_t mydo_sync_write(struct file *filp, const char __user *buf, size_t len, loff_t *ppos) { unsigned long buf_addr = (unsigned long)buf; - if(memcmp(filp->f_mapping->host->i_bdev->bd_disk->disk_name, "mtdblock", 8) == 0)// kernel mem is usb tran &&(buf_addr >= 0xc0000000) + if((memcmp(filp->f_mapping->host->i_bdev->bd_disk->disk_name, "mtdblock", 8) == 0) &&(buf_addr >= 0xc0000000))// kernel mem is usb tran &&(buf_addr >= 0xc0000000) { struct mtd_blktrans_dev *dev; struct mtd_blktrans_ops *tr; @@ -1524,10 +1524,10 @@ ssize_t mydo_sync_write(struct file *filp, const char __user *buf, size_t len, l dev = (filp->f_mapping->host->i_bdev->bd_disk->private_data); mtd = dev->mtd; - if((buf_addr < 0xc0000000)&&(mtd->name[0]=='u' &&mtd->name[3]=='r' && mtd->name[4]==0)) + /*if((buf_addr < 0xc0000000)&&(mtd->name[0]=='u' &&mtd->name[3]=='r' && mtd->name[4]==0)) { return(do_sync_write(filp, buf,len,ppos)); - } + }*/ tr = dev->tr; -- 2.34.1