linux3.01 yaffs2补丁,移植YAFFS2文件系统到linux3.18.4内核(原)

fs/yaffs2/yaffs_vfs.c: In function ‘yaffs_file_flush‘:

fs/yaffs2/yaffs_vfs.c:741: error: too few arguments to function ‘yaffs_flush_file‘

fs/yaffs2/yaffs_vfs.c: In function ‘yaffs_sync_object‘:

fs/yaffs2/yaffs_vfs.c:771: error: too few arguments to function ‘yaffs_flush_file‘

fs/yaffs2/yaffs_vfs.c: At top level:

fs/yaffs2/yaffs_vfs.c:781: error: ‘generic_file_aio_read‘ undeclared here (not in a function)

fs/yaffs2/yaffs_vfs.c:782: error: ‘generic_file_aio_write‘ undeclared here (not in a function)

fs/yaffs2/yaffs_vfs.c:787: error: ‘generic_file_splice_write‘ undeclared here (not in a function)

fs/yaffs2/yaffs_vfs.c: In function ‘yaffs_flush_inodes‘:

fs/yaffs2/yaffs_vfs.c:2190: error: too few arguments to function ‘yaffs_flush_file‘

fs/yaffs2/yaffs_vfs.c: In function ‘yaffs_flush_super‘:

fs/yaffs2/yaffs_vfs.c:2203: error: too few arguments to function ‘yaffs_flush_whole_cache‘

代码修改如下:

diff --git a/yaffs_vfs.c b/yaffs_vfs.c

index 76bc1db..f6e4ec2 100755

--- a/yaffs_vfs.c

+++ b/yaffs_vfs.c

@@ -738,7 +738,7 @@ static int yaffs_file_flush(struct file *file)

yaffs_gross_lock(dev);

-yaffs_flush_file(obj, 1, 0);

+yaffs_flush_file(obj, 1, 0, 1);

yaffs_gross_unlock(dev);

@@ -768,7 +768,7 @@ static int yaffs_sync_object(struct file *file, struct dentry *dentry,

yaffs_trace(YAFFS_TRACE_OS | YAFFS_TRACE_SYNC,

"yaffs_sync_object");

yaffs_gross_lock(dev);

-yaffs_flush_file(obj, 1, datasync);

+yaffs_flush_file(obj, 1, datasync, 1);

yaffs_gross_unlock(dev);

return 0;

}

@@ -778,13 +778,13 @@ static int yaffs_sync_object(struct file *file, struct dentry *dentry,

static const struct file_operations yaffs_file_operations = {

.read = do_sync_read,

.write = do_sync_write,

-.aio_read = generic_file_aio_read,

-.aio_write = generic_file_aio_write,

+ .read_iter =generic_file_read_iter,

+ .write_iter =generic_file_write_iter,

.mmap = generic_file_mmap,

.flush = yaffs_file_flush,

.fsync = yaffs_sync_object,

-.splice_read = generic_file_splice_read,

-.splice_write = generic_file_splice_write,

+.splice_read =generic_file_splice_read,

+.splice_write= iter_file_splice_write,

.llseek = generic_file_llseek,

};

@@ -2187,7 +2187,7 @@ static void yaffs_flush_inodes(struct super_block *sb)

yaffs_trace(YAFFS_TRACE_OS,

"flushing obj %d",

obj->obj_id);

-yaffs_flush_file(obj, 1, 0);

+yaffs_flush_file(obj, 1, 0, 1);

}

}

}

@@ -2200,7 +2200,7 @@ static void yaffs_flush_super(struct super_block *sb, int do_checkpoint)

yaffs_flush_inodes(sb);

yaffs_update_dirty_dirs(dev);

-yaffs_flush_whole_cache(dev);

+yaffs_flush_whole_cache(dev, 1);

if (do_checkpoint)

yaffs_checkpoint_save(dev);

}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值