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);
}