]> err.no Git - linux-2.6/blobdiff - fs/isofs/inode.c
[PATCH] epoll: use unlocked wqueue operations
[linux-2.6] / fs / isofs / inode.c
index 72cc9727dc0781ed231d027d5624bb1c53aeb7c3..3f9c8ba1fa1f95db3c3e622a17cefd5533087eee 100644 (file)
@@ -56,7 +56,7 @@ static void isofs_put_super(struct super_block *sb)
 }
 
 static void isofs_read_inode(struct inode *);
-static int isofs_statfs (struct super_block *, struct kstatfs *);
+static int isofs_statfs (struct dentry *, struct kstatfs *);
 
 static kmem_cache_t *isofs_inode_cachep;
 
@@ -87,7 +87,8 @@ static int init_inodecache(void)
 {
        isofs_inode_cachep = kmem_cache_create("isofs_inode_cache",
                                             sizeof(struct iso_inode_info),
-                                            0, SLAB_RECLAIM_ACCOUNT,
+                                            0, (SLAB_RECLAIM_ACCOUNT|
+                                               SLAB_MEM_SPREAD),
                                             init_once, NULL);
        if (isofs_inode_cachep == NULL)
                return -ENOMEM;
@@ -144,7 +145,8 @@ struct iso9660_options{
        char rock;
        char joliet;
        char cruft;
-       char unhide;
+       char hide;
+       char showassoc;
        char nocompress;
        unsigned char check;
        unsigned int blocksize;
@@ -309,13 +311,15 @@ enum {
        Opt_block, Opt_check_r, Opt_check_s, Opt_cruft, Opt_gid, Opt_ignore,
        Opt_iocharset, Opt_map_a, Opt_map_n, Opt_map_o, Opt_mode, Opt_nojoliet,
        Opt_norock, Opt_sb, Opt_session, Opt_uid, Opt_unhide, Opt_utf8, Opt_err,
-       Opt_nocompress,
+       Opt_nocompress, Opt_hide, Opt_showassoc,
 };
 
 static match_table_t tokens = {
        {Opt_norock, "norock"},
        {Opt_nojoliet, "nojoliet"},
        {Opt_unhide, "unhide"},
+       {Opt_hide, "hide"},
+       {Opt_showassoc, "showassoc"},
        {Opt_cruft, "cruft"},
        {Opt_utf8, "utf8"},
        {Opt_iocharset, "iocharset=%s"},
@@ -356,7 +360,8 @@ static int parse_options(char *options, struct iso9660_options *popt)
        popt->rock = 'y';
        popt->joliet = 'y';
        popt->cruft = 'n';
-       popt->unhide = 'n';
+       popt->hide = 'n';
+       popt->showassoc = 'n';
        popt->check = 'u';              /* unset */
        popt->nocompress = 0;
        popt->blocksize = 1024;
@@ -389,8 +394,12 @@ static int parse_options(char *options, struct iso9660_options *popt)
                case Opt_nojoliet:
                        popt->joliet = 'n';
                        break;
+               case Opt_hide:
+                       popt->hide = 'y';
+                       break;
                case Opt_unhide:
-                       popt->unhide = 'y';
+               case Opt_showassoc:
+                       popt->showassoc = 'y';
                        break;
                case Opt_cruft:
                        popt->cruft = 'y';
@@ -784,7 +793,8 @@ root_found:
        sbi->s_rock = (opt.rock == 'y' ? 2 : 0);
        sbi->s_rock_offset = -1; /* initial offset, will guess until SP is found*/
        sbi->s_cruft = opt.cruft;
-       sbi->s_unhide = opt.unhide;
+       sbi->s_hide = opt.hide;
+       sbi->s_showassoc = opt.showassoc;
        sbi->s_uid = opt.uid;
        sbi->s_gid = opt.gid;
        sbi->s_utf8 = opt.utf8;
@@ -846,8 +856,7 @@ root_found:
        if (opt.check == 'r') table++;
        s->s_root->d_op = &isofs_dentry_ops[table];
 
-       if (opt.iocharset)
-               kfree(opt.iocharset);
+       kfree(opt.iocharset);
 
        return 0;
 
@@ -886,15 +895,16 @@ out_unknown_format:
 out_freebh:
        brelse(bh);
 out_freesbi:
-       if (opt.iocharset)
-               kfree(opt.iocharset);
+       kfree(opt.iocharset);
        kfree(sbi);
        s->s_fs_info = NULL;
        return -EINVAL;
 }
 
-static int isofs_statfs (struct super_block *sb, struct kstatfs *buf)
+static int isofs_statfs (struct dentry *dentry, struct kstatfs *buf)
 {
+       struct super_block *sb = dentry->d_sb;
+
        buf->f_type = ISOFS_SUPER_MAGIC;
        buf->f_bsize = sb->s_blocksize;
        buf->f_blocks = (ISOFS_SB(sb)->s_nzones
@@ -1155,8 +1165,7 @@ out_nomem:
 
 out_noread:
        printk(KERN_INFO "ISOFS: unable to read i-node block %lu\n", block);
-       if (tmpde)
-               kfree(tmpde);
+       kfree(tmpde);
        return -EIO;
 
 out_toomany:
@@ -1325,8 +1334,7 @@ static void isofs_read_inode(struct inode *inode)
                init_special_inode(inode, inode->i_mode, inode->i_rdev);
 
 out:
-       if (tmpde)
-               kfree(tmpde);
+       kfree(tmpde);
        if (bh)
                brelse(bh);
        return;
@@ -1393,10 +1401,11 @@ struct inode *isofs_iget(struct super_block *sb,
        return inode;
 }
 
-static struct super_block *isofs_get_sb(struct file_system_type *fs_type,
-       int flags, const char *dev_name, void *data)
+static int isofs_get_sb(struct file_system_type *fs_type,
+       int flags, const char *dev_name, void *data, struct vfsmount *mnt)
 {
-       return get_sb_bdev(fs_type, flags, dev_name, data, isofs_fill_super);
+       return get_sb_bdev(fs_type, flags, dev_name, data, isofs_fill_super,
+                          mnt);
 }
 
 static struct file_system_type iso9660_fs_type = {