5 |
* |
* |
6 |
* Portions Copyright (C) 2005-2007 NTT DATA CORPORATION |
* Portions Copyright (C) 2005-2007 NTT DATA CORPORATION |
7 |
* |
* |
8 |
* Version: 1.3.3 2007/04/01 |
* Version: 1.5.2-pre 2007/11/27 |
9 |
* |
* |
10 |
* This file is applicable to 2.6.11 and later. |
* This file is applicable to 2.6.11 and later. |
11 |
* See README.ccs for ChangeLog. |
* See README.ccs for ChangeLog. |
50 |
|
|
51 |
#include <linux/namei.h> |
#include <linux/namei.h> |
52 |
#include <linux/version.h> |
#include <linux/version.h> |
53 |
|
#include <linux/sched.h> |
54 |
|
#include <linux/mm.h> |
55 |
|
|
56 |
static struct super_operations syaoran_ops; |
static struct super_operations syaoran_ops; |
57 |
static struct address_space_operations syaoran_aops; |
static struct address_space_operations syaoran_aops; |
212 |
return error; |
return error; |
213 |
} |
} |
214 |
|
|
215 |
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24) |
216 |
static struct address_space_operations syaoran_aops = { |
static struct address_space_operations syaoran_aops = { |
217 |
.readpage = simple_readpage, |
.readpage = simple_readpage, |
218 |
.prepare_write = simple_prepare_write, |
.prepare_write = simple_prepare_write, |
219 |
.commit_write = simple_commit_write |
.commit_write = simple_commit_write |
220 |
}; |
}; |
221 |
|
#else |
222 |
|
static struct address_space_operations syaoran_aops = { |
223 |
|
.readpage = simple_readpage, |
224 |
|
.write_begin = simple_write_begin, |
225 |
|
.write_end = simple_write_end, |
226 |
|
.set_page_dirty = __set_page_dirty_no_writeback, |
227 |
|
}; |
228 |
|
#endif |
229 |
|
|
230 |
static struct file_operations syaoran_file_operations = { |
static struct file_operations syaoran_file_operations = { |
231 |
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19) |
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19) |
239 |
#endif |
#endif |
240 |
.mmap = generic_file_mmap, |
.mmap = generic_file_mmap, |
241 |
.fsync = simple_sync_file, |
.fsync = simple_sync_file, |
242 |
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23) |
243 |
.sendfile = generic_file_sendfile, |
.sendfile = generic_file_sendfile, |
244 |
|
#else |
245 |
|
.splice_read = generic_file_splice_read, |
246 |
|
#endif |
247 |
.llseek = generic_file_llseek, |
.llseek = generic_file_llseek, |
248 |
}; |
}; |
249 |
|
|
322 |
return get_sb_nodev(fs_type, flags, data, syaoran_fill_super, mnt); |
return get_sb_nodev(fs_type, flags, data, syaoran_fill_super, mnt); |
323 |
} |
} |
324 |
#endif |
#endif |
325 |
|
EXPORT_SYMBOL(syaoran_get_sb); |
326 |
|
|
327 |
static struct file_system_type syaoran_fs_type = { |
static struct file_system_type syaoran_fs_type = { |
328 |
.owner = THIS_MODULE, |
.owner = THIS_MODULE, |
345 |
module_exit(exit_syaoran_fs) |
module_exit(exit_syaoran_fs) |
346 |
|
|
347 |
MODULE_LICENSE("GPL"); |
MODULE_LICENSE("GPL"); |
|
|
|
|
EXPORT_SYMBOL(syaoran_get_sb); |
|