mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-30 15:44:13 +08:00
[PATCH] befs: use generic_ro_fops
No need to duplicate a generic readonly file ops table in befs. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
8c65b4a604
commit
2cf0691621
@ -73,12 +73,6 @@ static struct inode_operations befs_dir_inode_operations = {
|
|||||||
.lookup = befs_lookup,
|
.lookup = befs_lookup,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct file_operations befs_file_operations = {
|
|
||||||
.llseek = default_llseek,
|
|
||||||
.read = generic_file_read,
|
|
||||||
.mmap = generic_file_readonly_mmap,
|
|
||||||
};
|
|
||||||
|
|
||||||
static struct address_space_operations befs_aops = {
|
static struct address_space_operations befs_aops = {
|
||||||
.readpage = befs_readpage,
|
.readpage = befs_readpage,
|
||||||
.sync_page = block_sync_page,
|
.sync_page = block_sync_page,
|
||||||
@ -398,7 +392,7 @@ befs_read_inode(struct inode *inode)
|
|||||||
inode->i_mapping->a_ops = &befs_aops;
|
inode->i_mapping->a_ops = &befs_aops;
|
||||||
|
|
||||||
if (S_ISREG(inode->i_mode)) {
|
if (S_ISREG(inode->i_mode)) {
|
||||||
inode->i_fop = &befs_file_operations;
|
inode->i_fop = &generic_ro_fops;
|
||||||
} else if (S_ISDIR(inode->i_mode)) {
|
} else if (S_ISDIR(inode->i_mode)) {
|
||||||
inode->i_op = &befs_dir_inode_operations;
|
inode->i_op = &befs_dir_inode_operations;
|
||||||
inode->i_fop = &befs_dir_operations;
|
inode->i_fop = &befs_dir_operations;
|
||||||
|
Loading…
Reference in New Issue
Block a user