diff options
Diffstat (limited to 'fs/befs/linuxvfs.c')
-rw-r--r-- | fs/befs/linuxvfs.c | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c index e0a6025f1d06..2d365cb8eec6 100644 --- a/fs/befs/linuxvfs.c +++ b/fs/befs/linuxvfs.c | |||
@@ -73,12 +73,6 @@ static struct inode_operations befs_dir_inode_operations = { | |||
73 | .lookup = befs_lookup, | 73 | .lookup = befs_lookup, |
74 | }; | 74 | }; |
75 | 75 | ||
76 | static struct file_operations befs_file_operations = { | ||
77 | .llseek = default_llseek, | ||
78 | .read = generic_file_read, | ||
79 | .mmap = generic_file_readonly_mmap, | ||
80 | }; | ||
81 | |||
82 | static struct address_space_operations befs_aops = { | 76 | static struct address_space_operations befs_aops = { |
83 | .readpage = befs_readpage, | 77 | .readpage = befs_readpage, |
84 | .sync_page = block_sync_page, | 78 | .sync_page = block_sync_page, |
@@ -398,7 +392,7 @@ befs_read_inode(struct inode *inode) | |||
398 | inode->i_mapping->a_ops = &befs_aops; | 392 | inode->i_mapping->a_ops = &befs_aops; |
399 | 393 | ||
400 | if (S_ISREG(inode->i_mode)) { | 394 | if (S_ISREG(inode->i_mode)) { |
401 | inode->i_fop = &befs_file_operations; | 395 | inode->i_fop = &generic_ro_fops; |
402 | } else if (S_ISDIR(inode->i_mode)) { | 396 | } else if (S_ISDIR(inode->i_mode)) { |
403 | inode->i_op = &befs_dir_inode_operations; | 397 | inode->i_op = &befs_dir_inode_operations; |
404 | inode->i_fop = &befs_dir_operations; | 398 | inode->i_fop = &befs_dir_operations; |
@@ -731,20 +725,16 @@ parse_options(char *options, befs_mount_options * opts) | |||
731 | static void | 725 | static void |
732 | befs_put_super(struct super_block *sb) | 726 | befs_put_super(struct super_block *sb) |
733 | { | 727 | { |
734 | if (BEFS_SB(sb)->mount_opts.iocharset) { | 728 | kfree(BEFS_SB(sb)->mount_opts.iocharset); |
735 | kfree(BEFS_SB(sb)->mount_opts.iocharset); | 729 | BEFS_SB(sb)->mount_opts.iocharset = NULL; |
736 | BEFS_SB(sb)->mount_opts.iocharset = NULL; | ||
737 | } | ||
738 | 730 | ||
739 | if (BEFS_SB(sb)->nls) { | 731 | if (BEFS_SB(sb)->nls) { |
740 | unload_nls(BEFS_SB(sb)->nls); | 732 | unload_nls(BEFS_SB(sb)->nls); |
741 | BEFS_SB(sb)->nls = NULL; | 733 | BEFS_SB(sb)->nls = NULL; |
742 | } | 734 | } |
743 | 735 | ||
744 | if (sb->s_fs_info) { | 736 | kfree(sb->s_fs_info); |
745 | kfree(sb->s_fs_info); | 737 | sb->s_fs_info = NULL; |
746 | sb->s_fs_info = NULL; | ||
747 | } | ||
748 | return; | 738 | return; |
749 | } | 739 | } |
750 | 740 | ||