]> err.no Git - linux-2.6/blobdiff - fs/befs/linuxvfs.c
Merge master.kernel.org:/home/rmk/linux-2.6-arm
[linux-2.6] / fs / befs / linuxvfs.c
index e0a6025f1d06a72a6423984ab838739ed0bf2bf6..68ebd10f345db87fc2d7cee847d16431168e257c 100644 (file)
@@ -64,7 +64,7 @@ static const struct super_operations befs_sops = {
 /* slab cache for befs_inode_info objects */
 static kmem_cache_t *befs_inode_cachep;
 
-static struct file_operations befs_dir_operations = {
+static const struct file_operations befs_dir_operations = {
        .read           = generic_read_dir,
        .readdir        = befs_readdir,
 };
@@ -73,12 +73,6 @@ static struct inode_operations befs_dir_inode_operations = {
        .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 = {
        .readpage       = befs_readpage,
        .sync_page      = block_sync_page,
@@ -398,7 +392,7 @@ befs_read_inode(struct inode *inode)
        inode->i_mapping->a_ops = &befs_aops;
 
        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)) {
                inode->i_op = &befs_dir_inode_operations;
                inode->i_fop = &befs_dir_operations;
@@ -433,7 +427,8 @@ befs_init_inodecache(void)
 {
        befs_inode_cachep = kmem_cache_create("befs_inode_cache",
                                              sizeof (struct befs_inode_info),
-                                             0, SLAB_RECLAIM_ACCOUNT,
+                                             0, (SLAB_RECLAIM_ACCOUNT|
+                                               SLAB_MEM_SPREAD),
                                              init_once, NULL);
        if (befs_inode_cachep == NULL) {
                printk(KERN_ERR "befs_init_inodecache: "
@@ -567,7 +562,7 @@ befs_utf2nls(struct super_block *sb, const char *in,
  * @sb: Superblock
  * @src: Input string buffer in NLS format
  * @srclen: Length of input string in bytes
- * @dest: The output string in UTF8 format
+ * @dest: The output string in UTF-8 format
  * @destlen: Length of the output buffer
  * 
  * Converts input string @src, which is in the format of the loaded NLS map,
@@ -731,20 +726,16 @@ parse_options(char *options, befs_mount_options * opts)
 static void
 befs_put_super(struct super_block *sb)
 {
-       if (BEFS_SB(sb)->mount_opts.iocharset) {
-               kfree(BEFS_SB(sb)->mount_opts.iocharset);
-               BEFS_SB(sb)->mount_opts.iocharset = NULL;
-       }
+       kfree(BEFS_SB(sb)->mount_opts.iocharset);
+       BEFS_SB(sb)->mount_opts.iocharset = NULL;
 
        if (BEFS_SB(sb)->nls) {
                unload_nls(BEFS_SB(sb)->nls);
                BEFS_SB(sb)->nls = NULL;
        }
 
-       if (sb->s_fs_info) {
-               kfree(sb->s_fs_info);
-               sb->s_fs_info = NULL;
-       }
+       kfree(sb->s_fs_info);
+       sb->s_fs_info = NULL;
        return;
 }